mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
added filter builder widget and filter tree
filter builder takes filter options from user, then adds completed filters to the filter tree. the filter tree does not currently do anything. in the future it will filter the cards in the database view.
This commit is contained in:
parent
0b2231639f
commit
863e437d4c
12 changed files with 847 additions and 26 deletions
31
cockatrice/src/cardfilter.cpp
Normal file
31
cockatrice/src/cardfilter.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include "cardfilter.h"
|
||||
|
||||
const char *CardFilter::typeName(Type t)
|
||||
{
|
||||
switch(t) {
|
||||
case TypeAnd:
|
||||
return "and";
|
||||
case TypeOr:
|
||||
return "or";
|
||||
case TypeAndNot:
|
||||
return "and not";
|
||||
case TypeOrNot:
|
||||
return "or not";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
const char *CardFilter::attrName(Attr a)
|
||||
{
|
||||
switch(a) {
|
||||
case AttrName:
|
||||
return "name";
|
||||
case AttrType:
|
||||
return "type";
|
||||
case AttrColor:
|
||||
return "color";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue