Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
e6fc2011
Commit
e6fc2011
authored
Apr 18, 2011
by
Max-Wilhelm Bruker
Browse files
deck editor and picture file name fixes
parent
0ea8375a
Changes
3
Show whitespace changes
Inline
Side-by-side
cockatrice/src/carddatabase.cpp
View file @
e6fc2011
...
@@ -298,8 +298,8 @@ QString CardInfo::getMainCardType() const
...
@@ -298,8 +298,8 @@ QString CardInfo::getMainCardType() const
QString
CardInfo
::
getCorrectedName
()
const
QString
CardInfo
::
getCorrectedName
()
const
{
{
QString
result
=
name
;
QString
result
=
name
;
// Fire // Ice, Circle of Protection: Red
// Fire // Ice, Circle of Protection: Red
, "Ach! Hans, Run!", Who/What/When/Where/Why, Question Elemental?
return
result
.
remove
(
" // "
).
remove
(
":"
);
return
result
.
remove
(
" // "
).
remove
(
':'
).
remove
(
'"'
).
remove
(
'?'
).
replace
(
'/'
,
' '
);
}
}
void
CardInfo
::
addToSet
(
CardSet
*
set
)
void
CardInfo
::
addToSet
(
CardSet
*
set
)
...
...
cockatrice/src/carddatabasemodel.h
View file @
e6fc2011
...
@@ -31,11 +31,11 @@ private:
...
@@ -31,11 +31,11 @@ private:
QSet
<
QString
>
cardTypes
,
cardColors
;
QSet
<
QString
>
cardTypes
,
cardColors
;
public:
public:
CardDatabaseDisplayModel
(
QObject
*
parent
=
0
);
CardDatabaseDisplayModel
(
QObject
*
parent
=
0
);
void
setCardNameBeginning
(
const
QString
&
_beginning
)
{
cardNameBeginning
=
_beginning
;
invalidate
Filter
();
}
void
setCardNameBeginning
(
const
QString
&
_beginning
)
{
cardNameBeginning
=
_beginning
;
invalidate
();
}
void
setCardName
(
const
QString
&
_cardName
)
{
cardName
=
_cardName
;
invalidate
Filter
();
}
void
setCardName
(
const
QString
&
_cardName
)
{
cardName
=
_cardName
;
invalidate
();
}
void
setCardText
(
const
QString
&
_cardText
)
{
cardText
=
_cardText
;
invalidate
Filter
();
}
void
setCardText
(
const
QString
&
_cardText
)
{
cardText
=
_cardText
;
invalidate
();
}
void
setCardTypes
(
const
QSet
<
QString
>
&
_cardTypes
)
{
cardTypes
=
_cardTypes
;
invalidate
Filter
();
}
void
setCardTypes
(
const
QSet
<
QString
>
&
_cardTypes
)
{
cardTypes
=
_cardTypes
;
invalidate
();
}
void
setCardColors
(
const
QSet
<
QString
>
&
_cardColors
)
{
cardColors
=
_cardColors
;
invalidate
Filter
();
}
void
setCardColors
(
const
QSet
<
QString
>
&
_cardColors
)
{
cardColors
=
_cardColors
;
invalidate
();
}
void
clearSearch
();
void
clearSearch
();
protected:
protected:
bool
filterAcceptsRow
(
int
sourceRow
,
const
QModelIndex
&
sourceParent
)
const
;
bool
filterAcceptsRow
(
int
sourceRow
,
const
QModelIndex
&
sourceParent
)
const
;
...
...
cockatrice/src/window_deckeditor.cpp
View file @
e6fc2011
...
@@ -68,6 +68,7 @@ WndDeckEditor::WndDeckEditor(QWidget *parent)
...
@@ -68,6 +68,7 @@ WndDeckEditor::WndDeckEditor(QWidget *parent)
databaseView
=
new
QTreeView
();
databaseView
=
new
QTreeView
();
databaseView
->
setModel
(
databaseDisplayModel
);
databaseView
->
setModel
(
databaseDisplayModel
);
databaseView
->
setUniformRowHeights
(
true
);
databaseView
->
setUniformRowHeights
(
true
);
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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment