deck editor and picture file name fixes
This commit is contained in:
parent
0ea8375a2f
commit
e6fc20114e
3 changed files with 8 additions and 7 deletions
|
@ -298,8 +298,8 @@ QString CardInfo::getMainCardType() const
|
|||
QString CardInfo::getCorrectedName() const
|
||||
{
|
||||
QString result = name;
|
||||
// Fire // Ice, Circle of Protection: Red
|
||||
return result.remove(" // ").remove(":");
|
||||
// Fire // Ice, Circle of Protection: Red, "Ach! Hans, Run!", Who/What/When/Where/Why, Question Elemental?
|
||||
return result.remove(" // ").remove(':').remove('"').remove('?').replace('/', ' ');
|
||||
}
|
||||
|
||||
void CardInfo::addToSet(CardSet *set)
|
||||
|
|
|
@ -31,11 +31,11 @@ private:
|
|||
QSet<QString> cardTypes, cardColors;
|
||||
public:
|
||||
CardDatabaseDisplayModel(QObject *parent = 0);
|
||||
void setCardNameBeginning(const QString &_beginning) { cardNameBeginning = _beginning; invalidateFilter(); }
|
||||
void setCardName(const QString &_cardName) { cardName = _cardName; invalidateFilter(); }
|
||||
void setCardText(const QString &_cardText) { cardText = _cardText; invalidateFilter(); }
|
||||
void setCardTypes(const QSet<QString> &_cardTypes) { cardTypes = _cardTypes; invalidateFilter(); }
|
||||
void setCardColors(const QSet<QString> &_cardColors) { cardColors = _cardColors; invalidateFilter(); }
|
||||
void setCardNameBeginning(const QString &_beginning) { cardNameBeginning = _beginning; invalidate(); }
|
||||
void setCardName(const QString &_cardName) { cardName = _cardName; invalidate(); }
|
||||
void setCardText(const QString &_cardText) { cardText = _cardText; invalidate(); }
|
||||
void setCardTypes(const QSet<QString> &_cardTypes) { cardTypes = _cardTypes; invalidate(); }
|
||||
void setCardColors(const QSet<QString> &_cardColors) { cardColors = _cardColors; invalidate(); }
|
||||
void clearSearch();
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
||||
|
|
|
@ -68,6 +68,7 @@ WndDeckEditor::WndDeckEditor(QWidget *parent)
|
|||
databaseView = new QTreeView();
|
||||
databaseView->setModel(databaseDisplayModel);
|
||||
databaseView->setUniformRowHeights(true);
|
||||
databaseView->setRootIsDecorated(false);
|
||||
databaseView->setAlternatingRowColors(true);
|
||||
databaseView->setSortingEnabled(true);
|
||||
databaseView->sortByColumn(0, Qt::AscendingOrder);
|
||||
|
|
Loading…
Reference in a new issue