mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 16:43:55 -07:00
reverted back to original deck editor layout but including filtertree
the original layout is actually more space efficient if using CardFrame instead of CardInfoWidget and reducing the size of the deck editor toolbar. this commit also removes the old search feature by removing the search button and the clear search button. the clear search menu item is left in place, however it now clears the filtertree. finally, the stretch factor for the right frame in the main layout was reduced to zero so that the card database gets priority for extra space. this makes more sense because the deck editor does not actually need very much horizontal space.
This commit is contained in:
parent
16d30fb9e1
commit
c786e180c3
9 changed files with 80 additions and 125 deletions
|
|
@ -27,23 +27,18 @@ public:
|
|||
virtual bool isLeaf() const { return false; }
|
||||
virtual const char *textCStr() const { return text().toStdString().c_str(); }
|
||||
virtual void nodeChanged() const {
|
||||
printf("%s -> ", textCStr());
|
||||
if (parent() != NULL) parent()->nodeChanged();
|
||||
}
|
||||
virtual void preInsertChild(const FilterTreeNode *p, int i) const {
|
||||
//printf("%s -> ", textCStr());
|
||||
if (parent() != NULL) parent()->preInsertChild(p, i);
|
||||
}
|
||||
virtual void postInsertChild(const FilterTreeNode *p, int i) const {
|
||||
//printf("%s -> ", textCStr());
|
||||
if (parent() != NULL) parent()->postInsertChild(p, i);
|
||||
}
|
||||
virtual void preRemoveChild(const FilterTreeNode *p, int i) const {
|
||||
printf("%s -> ", textCStr());
|
||||
if (parent() != NULL) parent()->preRemoveChild(p, i);
|
||||
}
|
||||
virtual void postRemoveChild(const FilterTreeNode *p, int i) const {
|
||||
printf("%s -> ", textCStr());
|
||||
if (parent() != NULL) parent()->postRemoveChild(p, i);
|
||||
}
|
||||
};
|
||||
|
|
@ -139,6 +134,13 @@ private:
|
|||
CardFilter::Type type);
|
||||
|
||||
bool testAttr(const CardInfo *info, const LogicMap *lm) const;
|
||||
|
||||
void nodeChanged() const { emit changed(); }
|
||||
void preInsertChild(const FilterTreeNode *p, int i) const { emit preInsertRow(p, i); }
|
||||
void postInsertChild(const FilterTreeNode *p, int i) const { emit postInsertRow(p, i); }
|
||||
void preRemoveChild(const FilterTreeNode *p, int i) const { emit preRemoveRow(p, i); }
|
||||
void postRemoveChild(const FilterTreeNode *p, int i) const { emit postRemoveRow(p, i); }
|
||||
|
||||
public:
|
||||
FilterTree();
|
||||
~FilterTree();
|
||||
|
|
@ -153,13 +155,8 @@ public:
|
|||
QString text() const { return QString("root"); }
|
||||
int index() const { return 0; }
|
||||
|
||||
void nodeChanged() const { printf("root\n"); emit changed(); }
|
||||
void preInsertChild(const FilterTreeNode *p, int i) const { emit preInsertRow(p, i); }
|
||||
void postInsertChild(const FilterTreeNode *p, int i) const { emit postInsertRow(p, i); }
|
||||
void preRemoveChild(const FilterTreeNode *p, int i) const { printf("root\n"); emit preRemoveRow(p, i); }
|
||||
void postRemoveChild(const FilterTreeNode *p, int i) const { printf("root\n"); emit postRemoveRow(p, i); }
|
||||
|
||||
bool acceptsCard(const CardInfo *info) const;
|
||||
void clear();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue