Merge remote-tracking branch 'refs/remotes/Cockatrice/master' into mod_notify_onbanwarn

This commit is contained in:
woogerboy21 2016-01-16 12:50:19 -05:00
commit 00afe74a3b
164 changed files with 165 additions and 249 deletions

View file

@ -2,10 +2,16 @@
--- ---
**Table of Contents**    [Cockatrice](#cockatrice) | [Get Involved] (#get-involved-) | [Community](#community-resources) | [Translation](#translation-status-) | [Building](#building--) | [Running](#running) | [License](#license-) **Table of Contents**    [Cockatrice](#cockatrice) | [Downloads](#downloads) | [Get Involved] (#get-involved-) | [Community](#community-resources) | [Translation](#translation-status-) | [Building](#building--) | [Running](#running) | [License](#license-)
--- ---
<br><pre>
<b>If you're getting started &#8674; [view our webpage](https://cockatrice.github.io/)</b><br>
<b>If you're trying to get support or suggest changes &#8674; [file an issue](https://github.com/Cockatrice/Cockatrice/issues/new)</b>
</pre><br>
# Cockatrice # Cockatrice
Cockatrice is an open-source multiplatform software for playing card games, Cockatrice is an open-source multiplatform software for playing card games,
@ -13,12 +19,15 @@ such as Magic: The Gathering, over a network. It is fully client-server based
to prevent any kind of cheating, though it supports single-player games without to prevent any kind of cheating, though it supports single-player games without
a network interface as well. Both client and server are written in Qt, supporting both Qt4 and Qt5.<br> a network interface as well. Both client and server are written in Qt, supporting both Qt4 and Qt5.<br>
# Downloads
We offer a download for both the last stable version (recommended for users) and the last development version. The development version contains the last implemented features, but can be unstable and unsuitable for gaming.
Downloads are hosted on [BinTray](https://bintray.com/).
- Latest stable version download: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice/_latestVersion) # Downloads
- Latest development (unstable) version download: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice-git/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice-git/_latestVersion)
We offer a download for all full releases and the latest development version (recommended). Full releases are checkpoints with major feature or UI enhancements between them, but are infrequently updated. The development version contains the most recently added features and bugfixes, but can be more unstable. Downloads for development versions are updated automatically with every change.
Downloads are hosted on [BinTray](https://bintray.com/cockatrice/Cockatrice).
- Latest development version (recommended): [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice-git/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice-git/_latestVersion#files)
- Latest full release: [ ![Download](https://api.bintray.com/packages/cockatrice/Cockatrice/Cockatrice/images/download.svg) ](https://bintray.com/cockatrice/Cockatrice/Cockatrice/_latestVersion#files)
# Get Involved [![Gitter chat](https://badges.gitter.im/Cockatrice/Cockatrice.png)](https://gitter.im/Cockatrice/Cockatrice) # Get Involved [![Gitter chat](https://badges.gitter.im/Cockatrice/Cockatrice.png)](https://gitter.im/Cockatrice/Cockatrice)
@ -26,21 +35,20 @@ Chat with the Cockatrice developers on Gitter. Come here to talk about the appli
# Community Resources # Community Resources
- [Cockatrice Official Site](https://cockatrice.github.io)
- [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki) - [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki)
- [reddit r/Cockatrice](http://reddit.com/r/cockatrice) - [reddit r/Cockatrice](https://reddit.com/r/cockatrice)
- [Woogerworks](http://www.woogerworks.com) / [Chickatrice] (http://www.chickatrice.net/) / [Poixen](http://www.poixen.com/) (incomplete Serverlist)<br>
# Translation Status [![Cockatrice on Transiflex](https://ds0k0en9abmn1.cloudfront.net/static/charts/images/tx-logo-micro.646b0065fce6.png)](https://www.transifex.com/projects/p/cockatrice/) # Translation Status [![Cockatrice on Transiflex](https://ds0k0en9abmn1.cloudfront.net/static/charts/images/tx-logo-micro.646b0065fce6.png)](https://www.transifex.com/projects/p/cockatrice/)
Cockatrice uses Transifex for translations. You can help us bring Cockatrice/Oracle to your language or edit single wordings by clicking on the associated charts below.<br> Cockatrice uses Transifex for translations. You can help us bring Cockatrice and Oracle to your language or just edit single wordings right from within your browser by simply visiting our [Transifex project page](https://www.transifex.com/projects/p/cockatrice/).<br>
Our [project page](https://www.transifex.com/projects/p/cockatrice/) offers a detailed overview for contributors.
Language statistics for `Cockatrice` *(on the left)* and `Oracle` *(on the right)*: | Cockatrice | Oracle |
|:-:|:-:|
| [![Cockatrice Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/) | [![Oracle Translation Status](https://www.transifex.com/projects/p/cockatrice/resource/oracle/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/) |
[![Cockatrice translations](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/resource/cockatrice/)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[![Oracle translations](https://www.transifex.com/projects/p/cockatrice/resource/oracle/chart/image_png)](https://www.transifex.com/projects/p/cockatrice/resource/oracle/) Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information about contributing!<br>
Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ) for more information!<br>
# Building [![Travis Build Status - master](https://travis-ci.org/Cockatrice/Cockatrice.svg?branch=master)](https://travis-ci.org/Cockatrice/Cockatrice) [![Appveyor Build Status - master](https://ci.appveyor.com/api/projects/status/lp5h0dhk4mhmeps7/branch/master?svg=true)](https://ci.appveyor.com/project/Daenyth/cockatrice/branch/master) # Building [![Travis Build Status - master](https://travis-ci.org/Cockatrice/Cockatrice.svg?branch=master)](https://travis-ci.org/Cockatrice/Cockatrice) [![Appveyor Build Status - master](https://ci.appveyor.com/api/projects/status/lp5h0dhk4mhmeps7/branch/master?svg=true)](https://ci.appveyor.com/project/Daenyth/cockatrice/branch/master)
@ -48,15 +56,15 @@ Check out our [Translator FAQ](https://github.com/Cockatrice/Cockatrice/wiki/Tra
**Detailed compiling instructions are on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)** **Detailed compiling instructions are on the Cockatrice wiki under [Compiling Cockatrice](https://github.com/Cockatrice/Cockatrice/wiki/Compiling-Cockatrice)**
Dependencies: Dependencies:
- [Qt](http://qt-project.org/) - [Qt](https://www.qt.io/developers/)
- [protobuf](http://code.google.com/p/protobuf/) - [protobuf](https://github.com/google/protobuf)
- [CMake](http://www.cmake.org/) - [CMake](https://www.cmake.org/)
Oracle can optionally use zlib to load zipped files: Oracle can optionally use zlib to load zipped files:
- [zlib](http://www.zlib.net/) - [zlib](http://www.zlib.net/) (no https!)
The server requires an additional dependency when compiled under Qt4: The server requires an additional dependency when compiled under Qt4:
- [libgcrypt](http://www.gnu.org/software/libgcrypt/) - [libgcrypt](https://www.gnu.org/software/libgcrypt/)
To compile: To compile:
@ -99,7 +107,7 @@ The following flags can be passed to `cmake`:
`servatrice` is the server<br> `servatrice` is the server<br>
# License [![GPLv2 License](https://img.shields.io/badge/license-GPLv2-blue.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING) # License [![GPLv2 License](https://img.shields.io/badge/License-GPLv2-blue.svg)](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING)
Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING). Cockatrice is free software, licensed under the [GPLv2](https://github.com/Cockatrice/Cockatrice/blob/master/COPYING).

View file

@ -157,8 +157,7 @@ void SetList::guessSortKeys()
} }
} }
CardInfo::CardInfo(CardDatabase *_db, CardInfo::CardInfo(const QString &_name,
const QString &_name,
bool _isToken, bool _isToken,
const QString &_manacost, const QString &_manacost,
const QString &_cmc, const QString &_cmc,
@ -176,8 +175,7 @@ CardInfo::CardInfo(CardDatabase *_db,
const QStringMap &_customPicURLs, const QStringMap &_customPicURLs,
MuidMap _muIds MuidMap _muIds
) )
: db(_db), : name(_name),
name(_name),
isToken(_isToken), isToken(_isToken),
sets(_sets), sets(_sets),
manacost(_manacost), manacost(_manacost),
@ -188,6 +186,7 @@ CardInfo::CardInfo(CardDatabase *_db,
colors(_colors), colors(_colors),
relatedCards(_relatedCards), relatedCards(_relatedCards),
reverseRelatedCards(_reverseRelatedCards), reverseRelatedCards(_reverseRelatedCards),
setsNames(),
upsideDownArt(_upsideDownArt), upsideDownArt(_upsideDownArt),
loyalty(_loyalty), loyalty(_loyalty),
customPicURLs(_customPicURLs), customPicURLs(_customPicURLs),
@ -200,6 +199,8 @@ CardInfo::CardInfo(CardDatabase *_db,
for (int i = 0; i < sets.size(); i++) for (int i = 0; i < sets.size(); i++)
sets[i]->append(this); sets[i]->append(this);
refreshCachedSetNames();
} }
CardInfo::~CardInfo() CardInfo::~CardInfo()
@ -249,6 +250,21 @@ void CardInfo::addToSet(CardSet *set)
{ {
set->append(this); set->append(this);
sets << set; sets << set;
refreshCachedSetNames();
}
void CardInfo::refreshCachedSetNames()
{
// update the cached list of set names
QStringList setList;
for (int i = 0; i < sets.size(); i++)
{
if(sets[i]->getEnabled())
setList << sets[i]->getShortName();
}
setsNames = setList.join(", ");
} }
QString CardInfo::simplifyName(const QString &name) { QString CardInfo::simplifyName(const QString &name) {
@ -330,10 +346,7 @@ CardDatabase::CardDatabase(QObject *parent)
connect(settingsCache, SIGNAL(cardDatabasePathChanged()), this, SLOT(loadCardDatabase())); connect(settingsCache, SIGNAL(cardDatabasePathChanged()), this, SLOT(loadCardDatabase()));
connect(settingsCache, SIGNAL(tokenDatabasePathChanged()), this, SLOT(loadTokenDatabase())); connect(settingsCache, SIGNAL(tokenDatabasePathChanged()), this, SLOT(loadTokenDatabase()));
loadCardDatabase(); noCard = new CardInfo();
loadTokenDatabase();
noCard = new CardInfo(this);
} }
CardDatabase::~CardDatabase() CardDatabase::~CardDatabase()
@ -506,7 +519,7 @@ void CardDatabase::loadCardsFromXml(QXmlStreamReader &xml, bool tokens)
} }
if (isToken == tokens) { if (isToken == tokens) {
addCard(new CardInfo(this, name, isToken, manacost, cmc, type, pt, text, colors, relatedCards, reverseRelatedCards, upsideDown, loyalty, cipt, tableRow, sets, customPicURLs, muids)); addCard(new CardInfo(name, isToken, manacost, cmc, type, pt, text, colors, relatedCards, reverseRelatedCards, upsideDown, loyalty, cipt, tableRow, sets, customPicURLs, muids));
} }
} }
} }
@ -517,7 +530,7 @@ CardInfo *CardDatabase::getCardFromMap(CardNameMap &cardMap, const QString &card
return cardMap.value(cardName); return cardMap.value(cardName);
if (createIfNotFound) { if (createIfNotFound) {
CardInfo *newCard = new CardInfo(this, cardName, true); CardInfo *newCard = new CardInfo(cardName, true);
newCard->addToSet(getSet(CardDatabase::TOKENS_SETNAME)); newCard->addToSet(getSet(CardDatabase::TOKENS_SETNAME));
cardMap.insert(cardName, newCard); cardMap.insert(cardName, newCard);
return newCard; return newCard;
@ -619,23 +632,22 @@ LoadStatus CardDatabase::loadCardDatabase(const QString &path, bool tokens)
emit cardListChanged(); emit cardListChanged();
} }
if (!tokens) { if (!tokens)
loadStatus = tempLoadStatus; loadStatus = tempLoadStatus;
qDebug() << "loadCardDatabase(): Path = " << path << " Status = " << loadStatus;
}
qDebug() << "loadCardDatabase(): Path =" << path << "Tokens =" << tokens << "Status =" << loadStatus;
return tempLoadStatus; return tempLoadStatus;
} }
void CardDatabase::loadCardDatabase() LoadStatus CardDatabase::loadCardDatabase()
{ {
loadCardDatabase(settingsCache->getCardDatabasePath(), false); return loadCardDatabase(settingsCache->getCardDatabasePath(), false);
} }
void CardDatabase::loadTokenDatabase() LoadStatus CardDatabase::loadTokenDatabase()
{ {
loadCardDatabase(settingsCache->getTokenDatabasePath(), true); return loadCardDatabase(settingsCache->getTokenDatabasePath(), true);
} }
void CardDatabase::loadCustomCardDatabases(const QString &path) void CardDatabase::loadCustomCardDatabases(const QString &path)

View file

@ -60,8 +60,6 @@ public:
class CardInfo : public QObject { class CardInfo : public QObject {
Q_OBJECT Q_OBJECT
private: private:
CardDatabase *db;
QString name; QString name;
/* /*
@ -84,6 +82,7 @@ private:
QStringList reverseRelatedCards; QStringList reverseRelatedCards;
// the cards thare are reverse-related to me // the cards thare are reverse-related to me
QStringList reverseRelatedCardsToMe; QStringList reverseRelatedCardsToMe;
QString setsNames;
bool upsideDownArt; bool upsideDownArt;
int loyalty; int loyalty;
QStringMap customPicURLs; QStringMap customPicURLs;
@ -92,9 +91,9 @@ private:
int tableRow; int tableRow;
QString pixmapCacheKey; QString pixmapCacheKey;
void refreshCachedSetNames();
public: public:
CardInfo(CardDatabase *_db, CardInfo(const QString &_name = QString(),
const QString &_name = QString(),
bool _isToken = false, bool _isToken = false,
const QString &_manacost = QString(), const QString &_manacost = QString(),
const QString &_cmc = QString(), const QString &_cmc = QString(),
@ -113,14 +112,15 @@ public:
MuidMap muids = MuidMap() MuidMap muids = MuidMap()
); );
~CardInfo(); ~CardInfo();
const QString &getName() const { return name; } inline const QString &getName() const { return name; }
inline const QString &getSetsNames() const { return setsNames; }
const QString &getSimpleName() const { return simpleName; } const QString &getSimpleName() const { return simpleName; }
bool getIsToken() const { return isToken; } bool getIsToken() const { return isToken; }
const SetList &getSets() const { return sets; } const SetList &getSets() const { return sets; }
const QString &getManaCost() const { return manacost; } inline const QString &getManaCost() const { return manacost; }
const QString &getCmc() const { return cmc; } inline const QString &getCmc() const { return cmc; }
const QString &getCardType() const { return cardtype; } inline const QString &getCardType() const { return cardtype; }
const QString &getPowTough() const { return powtough; } inline const QString &getPowTough() const { return powtough; }
const QString &getText() const { return text; } const QString &getText() const { return text; }
const QString &getPixmapCacheKey() const { return pixmapCacheKey; } const QString &getPixmapCacheKey() const { return pixmapCacheKey; }
const int &getLoyalty() const { return loyalty; } const int &getLoyalty() const { return loyalty; }
@ -229,12 +229,12 @@ public:
bool hasDetectedFirstRun(); bool hasDetectedFirstRun();
void refreshCachedReverseRelatedCards(); void refreshCachedReverseRelatedCards();
public slots: public slots:
LoadStatus loadCardDatabase(const QString &path, bool tokens = false); LoadStatus loadCardDatabase();
LoadStatus loadTokenDatabase();
void loadCustomCardDatabases(const QString &path); void loadCustomCardDatabases(const QString &path);
void emitCardListChanged(); void emitCardListChanged();
private slots: private slots:
void loadCardDatabase(); LoadStatus loadCardDatabase(const QString &path, bool tokens = false);
void loadTokenDatabase();
signals: signals:
void cardListChanged(); void cardListChanged();
void cardAdded(CardInfo *card); void cardAdded(CardInfo *card);

View file

@ -28,26 +28,16 @@ int CardDatabaseModel::columnCount(const QModelIndex &/*parent*/) const
QVariant CardDatabaseModel::data(const QModelIndex &index, int role) const QVariant CardDatabaseModel::data(const QModelIndex &index, int role) const
{ {
if (!index.isValid()) if (!index.isValid() ||
return QVariant(); index.row() >= cardList.size() ||
if ((index.row() >= cardList.size()) || (index.column() >= CARDDBMODEL_COLUMNS)) index.column() >= CARDDBMODEL_COLUMNS ||
return QVariant(); (role != Qt::DisplayRole && role != SortRole))
if (role != Qt::DisplayRole && role != SortRole)
return QVariant(); return QVariant();
CardInfo *card = cardList.at(index.row()); CardInfo *card = cardList.at(index.row());
switch (index.column()){ switch (index.column()){
case NameColumn: return card->getName(); case NameColumn: return card->getName();
case SetListColumn: { case SetListColumn: return card->getSetsNames();
QStringList setList;
const QList<CardSet *> &sets = card->getSets();
for (int i = 0; i < sets.size(); i++)
{
if(sets[i]->getEnabled())
setList << sets[i]->getShortName();
}
return setList.join(", ");
}
case ManaCostColumn: return role == SortRole ? case ManaCostColumn: return role == SortRole ?
QString("%1%2").arg(card->getCmc(), 4, QChar('0')).arg(card->getManaCost()) : QString("%1%2").arg(card->getCmc(), 4, QChar('0')).arg(card->getManaCost()) :
card->getManaCost(); card->getManaCost();
@ -139,8 +129,30 @@ CardDatabaseDisplayModel::CardDatabaseDisplayModel(QObject *parent)
filterTree = NULL; filterTree = NULL;
setFilterCaseSensitivity(Qt::CaseInsensitive); setFilterCaseSensitivity(Qt::CaseInsensitive);
setSortCaseSensitivity(Qt::CaseInsensitive); setSortCaseSensitivity(Qt::CaseInsensitive);
loadedRowCount = 0;
} }
bool CardDatabaseDisplayModel::canFetchMore(const QModelIndex & index) const
{
return loadedRowCount < sourceModel()->rowCount(index);
}
void CardDatabaseDisplayModel::fetchMore(const QModelIndex & index)
{
int remainder = sourceModel()->rowCount(index) - loadedRowCount;
int itemsToFetch = qMin(100, remainder);
beginInsertRows(QModelIndex(), loadedRowCount, loadedRowCount+itemsToFetch-1);
loadedRowCount += itemsToFetch;
endInsertRows();
}
int CardDatabaseDisplayModel::rowCount(const QModelIndex &parent) const
{
return qMin(QSortFilterProxyModel::rowCount(parent), loadedRowCount);
}
bool CardDatabaseDisplayModel::lessThan(const QModelIndex &left, const QModelIndex &right) const { bool CardDatabaseDisplayModel::lessThan(const QModelIndex &left, const QModelIndex &right) const {

View file

@ -42,6 +42,7 @@ private:
QString searchTerm; QString searchTerm;
QSet<QString> cardNameSet, cardTypes, cardColors; QSet<QString> cardNameSet, cardTypes, cardColors;
FilterTree *filterTree; FilterTree *filterTree;
int loadedRowCount;
public: public:
CardDatabaseDisplayModel(QObject *parent = 0); CardDatabaseDisplayModel(QObject *parent = 0);
void setFilterTree(FilterTree *filterTree); void setFilterTree(FilterTree *filterTree);
@ -54,9 +55,13 @@ public:
void setCardTypes(const QSet<QString> &_cardTypes) { cardTypes = _cardTypes; invalidate(); } void setCardTypes(const QSet<QString> &_cardTypes) { cardTypes = _cardTypes; invalidate(); }
void setCardColors(const QSet<QString> &_cardColors) { cardColors = _cardColors; invalidate(); } void setCardColors(const QSet<QString> &_cardColors) { cardColors = _cardColors; invalidate(); }
void clearFilterAll(); void clearFilterAll();
int rowCount(const QModelIndex &parent = QModelIndex()) const;
protected: protected:
bool lessThan(const QModelIndex &left, const QModelIndex &right) const; bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
bool canFetchMore(const QModelIndex &parent) const;
void fetchMore(const QModelIndex &parent);
private slots: private slots:
void filterTreeChanged(); void filterTreeChanged();
}; };

View file

@ -145,7 +145,7 @@ void DlgEditTokens::actAddToken()
if (name.isEmpty()) if (name.isEmpty())
return; return;
CardInfo *card = new CardInfo(cardDatabaseModel->getDatabase(), name, true); CardInfo *card = new CardInfo(name, true);
card->addToSet(cardDatabaseModel->getDatabase()->getSet(CardDatabase::TOKENS_SETNAME)); card->addToSet(cardDatabaseModel->getDatabase()->getSet(CardDatabase::TOKENS_SETNAME));
card->setCardType("Token"); card->setCardType("Token");
cardDatabaseModel->getDatabase()->addCard(card); cardDatabaseModel->getDatabase()->addCard(card);

View file

@ -164,11 +164,14 @@ int main(int argc, char *argv[])
const QString dataDir = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first(); const QString dataDir = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();
#endif #endif
if (!db->getLoadSuccess()) if (settingsCache->getCardDatabasePath().isEmpty() ||
if (!db->loadCardDatabase(dataDir + "/cards.xml")) db->loadCardDatabase() != Ok)
settingsCache->setCardDatabasePath(dataDir + "/cards.xml"); settingsCache->setCardDatabasePath(dataDir + "/cards.xml");
if (settingsCache->getTokenDatabasePath().isEmpty())
if (settingsCache->getTokenDatabasePath().isEmpty() ||
db->loadTokenDatabase() != Ok)
settingsCache->setTokenDatabasePath(dataDir + "/tokens.xml"); settingsCache->setTokenDatabasePath(dataDir + "/tokens.xml");
if (!QDir(settingsCache->getDeckPath()).exists() || settingsCache->getDeckPath().isEmpty()) { if (!QDir(settingsCache->getDeckPath()).exists() || settingsCache->getDeckPath().isEmpty()) {
QDir().mkpath(dataDir + "/decks"); QDir().mkpath(dataDir + "/decks");
settingsCache->setDeckPath(dataDir + "/decks"); settingsCache->setDeckPath(dataDir + "/decks");

View file

@ -58,7 +58,8 @@ void ReplayTimelineWidget::paintEvent(QPaintEvent * /* event */)
painter.fillPath(path, Qt::black); painter.fillPath(path, Qt::black);
const QColor barColor = QColor::fromHsv(120, 255, 255, 100); const QColor barColor = QColor::fromHsv(120, 255, 255, 100);
painter.fillRect(0, 0, (width() - 1) * currentTime / maxTime, height() - 1, barColor); quint64 w = (quint64)(width() - 1) * (quint64) currentTime / maxTime;
painter.fillRect(0, 0, w, height() - 1, barColor);
} }
QSize ReplayTimelineWidget::sizeHint() const QSize ReplayTimelineWidget::sizeHint() const

View file

@ -367,17 +367,16 @@ void TabDeckEditor::createCentralFrame()
databaseDisplayModel = new CardDatabaseDisplayModel(this); databaseDisplayModel = new CardDatabaseDisplayModel(this);
databaseDisplayModel->setSourceModel(databaseModel); databaseDisplayModel->setSourceModel(databaseModel);
databaseDisplayModel->setFilterKeyColumn(0); databaseDisplayModel->setFilterKeyColumn(0);
databaseDisplayModel->sort(0, Qt::AscendingOrder);
databaseView = new QTreeView(); databaseView = new QTreeView();
databaseView->setObjectName("databaseView"); databaseView->setObjectName("databaseView");
databaseView->setFocusProxy(searchEdit); databaseView->setFocusProxy(searchEdit);
databaseView->setModel(databaseDisplayModel);
databaseView->setUniformRowHeights(true); databaseView->setUniformRowHeights(true);
databaseView->setRootIsDecorated(false); databaseView->setRootIsDecorated(false);
databaseView->setAlternatingRowColors(true); databaseView->setAlternatingRowColors(true);
databaseView->setSortingEnabled(true); databaseView->setSortingEnabled(true);
databaseView->sortByColumn(0, Qt::AscendingOrder); databaseView->sortByColumn(0, Qt::AscendingOrder);
databaseView->setModel(databaseDisplayModel);
databaseView->resizeColumnToContents(0); databaseView->resizeColumnToContents(0);
connect(databaseView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(updateCardInfoLeft(const QModelIndex &, const QModelIndex &))); connect(databaseView->selectionModel(), SIGNAL(currentRowChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(updateCardInfoLeft(const QModelIndex &, const QModelIndex &)));
connect(databaseView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actAddCard())); connect(databaseView, SIGNAL(doubleClicked(const QModelIndex &)), this, SLOT(actAddCard()));

View file

@ -1,4 +1,3 @@
syntax = "proto2";
message AdminCommand { message AdminCommand {
enum AdminCommandType { enum AdminCommandType {
UPDATE_SERVER_MESSAGE = 1000; UPDATE_SERVER_MESSAGE = 1000;

View file

@ -1,4 +1,3 @@
syntax = "proto2";
enum CardAttribute { enum CardAttribute {
AttrTapped = 1; AttrTapped = 1;
AttrAttacking = 2; AttrAttacking = 2;

View file

@ -1,4 +1,3 @@
syntax = "proto2";
message color { message color {
optional uint32 r = 1; optional uint32 r = 1;
optional uint32 g = 2; optional uint32 g = 2;

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_AttachCard { message Command_AttachCard {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_ChangeZoneProperties { message Command_ChangeZoneProperties {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_Concede { message Command_Concede {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
import "color.proto"; import "color.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
import "color.proto"; import "color.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_CreateToken { message Command_CreateToken {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckDel { message Command_DeckDel {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckDelDir { message Command_DeckDelDir {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckDownload { message Command_DeckDownload {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckList { message Command_DeckList {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckNewDir { message Command_DeckNewDir {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_DeckSelect { message Command_DeckSelect {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_DeckUpload { message Command_DeckUpload {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_DelCounter { message Command_DelCounter {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_DeleteArrow { message Command_DeleteArrow {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_DrawCards { message Command_DrawCards {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_DumpZone { message Command_DumpZone {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_FlipCard { message Command_FlipCard {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_GameSay { message Command_GameSay {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_IncCardCounter { message Command_IncCardCounter {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_IncCounter { message Command_IncCounter {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_KickFromGame { message Command_KickFromGame {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_LeaveGame { message Command_LeaveGame {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message CardToMove { message CardToMove {
optional sint32 card_id = 1 [default = -1]; optional sint32 card_id = 1 [default = -1];

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_Mulligan { message Command_Mulligan {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_NextTurn { message Command_NextTurn {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_ReadyStart { message Command_ReadyStart {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_ReplayDeleteMatch { message Command_ReplayDeleteMatch {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_ReplayDownload { message Command_ReplayDownload {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_ReplayList { message Command_ReplayList {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
message Command_ReplayModifyMatch { message Command_ReplayModifyMatch {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_RevealCards { message Command_RevealCards {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_RollDie { message Command_RollDie {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_SetActivePhase { message Command_SetActivePhase {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
import "card_attributes.proto"; import "card_attributes.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_SetCardCounter { message Command_SetCardCounter {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_SetCounter { message Command_SetCounter {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_SetSideboardLock { message Command_SetSideboardLock {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
import "move_card_to_zone.proto"; import "move_card_to_zone.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_Shuffle { message Command_Shuffle {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_StopDumpZone { message Command_StopDumpZone {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_commands.proto"; import "game_commands.proto";
message Command_UndoDraw { message Command_UndoDraw {
extend GameCommand { extend GameCommand {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_commands.proto"; import "session_commands.proto";
import "game_commands.proto"; import "game_commands.proto";
import "room_commands.proto"; import "room_commands.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_Concede { message Context_Concede {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_ConnectionStateChanged { message Context_ConnectionStateChanged {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_DeckSelect { message Context_DeckSelect {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_MoveCard { message Context_MoveCard {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_Mulligan { message Context_Mulligan {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_PingChanged { message Context_PingChanged {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_ReadyStart { message Context_ReadyStart {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_SetSideboardLock { message Context_SetSideboardLock {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event_context.proto"; import "game_event_context.proto";
message Context_UndoDraw { message Context_UndoDraw {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
import "serverinfo_user.proto"; import "serverinfo_user.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_AttachCard { message Event_AttachCard {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_ChangeZoneProperties { message Event_ChangeZoneProperties {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
message Event_ConnectionClosed { message Event_ConnectionClosed {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_arrow.proto"; import "serverinfo_arrow.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_counter.proto"; import "serverinfo_counter.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_CreateToken { message Event_CreateToken {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_DelCounter { message Event_DelCounter {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_DeleteArrow { message Event_DeleteArrow {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_DestroyCard { message Event_DestroyCard {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_card.proto"; import "serverinfo_card.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_DumpZone { message Event_DumpZone {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_FlipCard { message Event_FlipCard {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_GameClosed { message Event_GameClosed {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_GameHostChanged { message Event_GameHostChanged {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
import "serverinfo_game.proto"; import "serverinfo_game.proto";
import "serverinfo_gametype.proto"; import "serverinfo_gametype.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_GameSay { message Event_GameSay {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_player.proto"; import "serverinfo_player.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_playerproperties.proto"; import "serverinfo_playerproperties.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "room_event.proto"; import "room_event.proto";
import "serverinfo_user.proto"; import "serverinfo_user.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_Kicked { message Event_Kicked {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_Leave { message Event_Leave {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "room_event.proto"; import "room_event.proto";
message Event_LeaveRoom { message Event_LeaveRoom {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "room_event.proto"; import "room_event.proto";
import "serverinfo_game.proto"; import "serverinfo_game.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
import "serverinfo_room.proto"; import "serverinfo_room.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_MoveCard { message Event_MoveCard {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
message Event_NotifyUser { message Event_NotifyUser {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_playerproperties.proto"; import "serverinfo_playerproperties.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
message Event_RemoveFromList { message Event_RemoveFromList {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
import "serverinfo_replay_match.proto"; import "serverinfo_replay_match.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
import "serverinfo_card.proto"; import "serverinfo_card.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "game_event.proto"; import "game_event.proto";
message Event_RollDie { message Event_RollDie {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "room_event.proto"; import "room_event.proto";
message Event_RoomSay { message Event_RoomSay {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
import "serverinfo_user.proto"; import "serverinfo_user.proto";
import "serverinfo_room.proto"; import "serverinfo_room.proto";

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
message Event_ServerIdentification { message Event_ServerIdentification {

View file

@ -1,4 +1,3 @@
syntax = "proto2";
import "session_event.proto"; import "session_event.proto";
message Event_ServerMessage { message Event_ServerMessage {

Some files were not shown because too many files have changed in this diff Show more