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
a6bc7095
Commit
a6bc7095
authored
Sep 13, 2015
by
Fabio Bas
Browse files
merged master
parents
5aaae527
f2864ce5
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
cockatrice/cockatrice.qrc
View file @
a6bc7095
<RCC>
<qresource prefix="/" >
<file>resources/back.svg</file>
<file>resources/
card
back.svg</file>
<file>resources/cockatrice.svg</file>
<file>resources/hand.svg</file>
<file>resources/hr.jpg</file>
...
...
cockatrice/resources/back.svg
→
cockatrice/resources/
card
back.svg
View file @
a6bc7095
File moved
cockatrice/src/carddatabase.cpp
View file @
a6bc7095
...
...
@@ -625,7 +625,7 @@ void CardInfo::loadPixmap(QPixmap &pixmap)
pixmap
=
QPixmap
();
if
(
getName
().
isEmpty
())
{
pixmap
=
themeManager
->
getC
ard
B
ack
Pixmap
(
);
pixmap
=
QPixmap
(
"theme:c
ard
b
ack
"
);
return
;
}
...
...
@@ -656,7 +656,7 @@ void CardInfo::getPixmap(QSize size, QPixmap &pixmap)
loadPixmap
(
bigPixmap
);
if
(
bigPixmap
.
isNull
())
{
if
(
getName
().
isEmpty
())
{
pixmap
=
themeManager
->
getC
ard
B
ack
Pixmap
(
);
pixmap
=
pixmap
=
QPixmap
(
"theme:c
ard
b
ack
"
);
}
else
{
pixmap
=
QPixmap
();
// null
return
;
...
...
cockatrice/src/dlg_edit_tokens.cpp
View file @
a6bc7095
...
...
@@ -83,10 +83,10 @@ DlgEditTokens::DlgEditTokens(CardDatabaseModel *_cardDatabaseModel, QWidget *par
connect
(
chooseTokenView
->
selectionModel
(),
SIGNAL
(
currentRowChanged
(
QModelIndex
,
QModelIndex
)),
this
,
SLOT
(
tokenSelectionChanged
(
QModelIndex
,
QModelIndex
)));
QAction
*
aAddToken
=
new
QAction
(
tr
(
"Add token"
),
this
);
aAddToken
->
setIcon
(
Q
Icon
(
"theme:icons/increment
.svg
"
));
aAddToken
->
setIcon
(
Q
Pixmap
(
"theme:icons/increment"
));
connect
(
aAddToken
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAddToken
()));
QAction
*
aRemoveToken
=
new
QAction
(
tr
(
"Remove token"
),
this
);
aRemoveToken
->
setIcon
(
Q
Icon
(
"theme:icons/decrement
.svg
"
));
aRemoveToken
->
setIcon
(
Q
Pixmap
(
"theme:icons/decrement"
));
connect
(
aRemoveToken
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actRemoveToken
()));
QToolBar
*
databaseToolBar
=
new
QToolBar
;
...
...
cockatrice/src/dlg_edit_user.cpp
View file @
a6bc7095
...
...
@@ -18,9 +18,9 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, int gender, QString cou
genderLabel
=
new
QLabel
(
tr
(
"Pronouns:"
));
genderEdit
=
new
QComboBox
();
genderLabel
->
setBuddy
(
genderEdit
);
genderEdit
->
insertItem
(
0
,
Q
Icon
(
"theme:genders/unknown
.svg
"
),
tr
(
"Neutral"
));
genderEdit
->
insertItem
(
1
,
Q
Icon
(
"theme:genders/male
.svg
"
),
tr
(
"Masculine"
));
genderEdit
->
insertItem
(
2
,
Q
Icon
(
"theme:genders/female
.svg
"
),
tr
(
"Feminine"
));
genderEdit
->
insertItem
(
0
,
Q
Pixmap
(
"theme:genders/unknown"
),
tr
(
"Neutral"
));
genderEdit
->
insertItem
(
1
,
Q
Pixmap
(
"theme:genders/male"
),
tr
(
"Masculine"
));
genderEdit
->
insertItem
(
2
,
Q
Pixmap
(
"theme:genders/female"
),
tr
(
"Feminine"
));
genderEdit
->
setCurrentIndex
(
gender
+
1
);
countryLabel
=
new
QLabel
(
tr
(
"Country:"
));
...
...
@@ -33,7 +33,7 @@ DlgEditUser::DlgEditUser(QWidget *parent, QString email, int gender, QString cou
int
i
=
1
;
foreach
(
QString
c
,
countries
)
{
countryEdit
->
addItem
(
QPixmap
(
"theme:countries/"
+
c
.
toLower
()
+
".svg"
),
c
);
countryEdit
->
addItem
(
QPixmap
(
"theme:countries/"
+
c
.
toLower
()),
c
);
if
(
c
==
country
)
countryEdit
->
setCurrentIndex
(
i
);
...
...
cockatrice/src/dlg_register.cpp
View file @
a6bc7095
This diff is collapsed.
Click to expand it.
cockatrice/src/dlg_settings.cpp
View file @
a6bc7095
...
...
@@ -522,10 +522,10 @@ MessagesSettingsPage::MessagesSettingsPage()
messageList
->
addItem
(
settingsCache
->
messages
().
getMessageAt
(
i
));
aAdd
=
new
QAction
(
this
);
aAdd
->
setIcon
(
Q
Icon
(
"theme:icons/increment
.svg
"
));
aAdd
->
setIcon
(
Q
Pixmap
(
"theme:icons/increment"
));
connect
(
aAdd
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAdd
()));
aRemove
=
new
QAction
(
this
);
aRemove
->
setIcon
(
Q
Icon
(
"theme:icons/decrement
.svg
"
));
aRemove
->
setIcon
(
Q
Pixmap
(
"theme:icons/decrement"
));
connect
(
aRemove
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actRemove
()));
QToolBar
*
messageToolBar
=
new
QToolBar
;
...
...
@@ -635,8 +635,6 @@ void MessagesSettingsPage::retranslateUi()
SoundSettingsPage
::
SoundSettingsPage
()
{
QIcon
deleteIcon
(
"theme:icons/delete.svg"
);
soundEnabledCheckBox
.
setChecked
(
settingsCache
->
getSoundEnabled
());
connect
(
&
soundEnabledCheckBox
,
SIGNAL
(
stateChanged
(
int
)),
settingsCache
,
SLOT
(
setSoundEnabled
(
int
)));
...
...
@@ -763,37 +761,37 @@ void DlgSettings::createIcons()
generalButton
=
new
QListWidgetItem
(
contentsWidget
);
generalButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
generalButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
generalButton
->
setIcon
(
Q
Icon
(
"theme:config/general
.svg
"
));
generalButton
->
setIcon
(
Q
Pixmap
(
"theme:config/general"
));
appearanceButton
=
new
QListWidgetItem
(
contentsWidget
);
appearanceButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
appearanceButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
appearanceButton
->
setIcon
(
Q
Icon
(
"theme:config/appearance
.svg
"
));
appearanceButton
->
setIcon
(
Q
Pixmap
(
"theme:config/appearance"
));
userInterfaceButton
=
new
QListWidgetItem
(
contentsWidget
);
userInterfaceButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
userInterfaceButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
userInterfaceButton
->
setIcon
(
Q
Icon
(
"theme:config/interface
.svg
"
));
userInterfaceButton
->
setIcon
(
Q
Pixmap
(
"theme:config/interface"
));
deckEditorButton
=
new
QListWidgetItem
(
contentsWidget
);
deckEditorButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
deckEditorButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
deckEditorButton
->
setIcon
(
Q
Icon
(
"theme:config/deckeditor
.svg
"
));
deckEditorButton
->
setIcon
(
Q
Pixmap
(
"theme:config/deckeditor"
));
messagesButton
=
new
QListWidgetItem
(
contentsWidget
);
messagesButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
messagesButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
messagesButton
->
setIcon
(
Q
Icon
(
"theme:config/messages
.svg
"
));
messagesButton
->
setIcon
(
Q
Pixmap
(
"theme:config/messages"
));
soundButton
=
new
QListWidgetItem
(
contentsWidget
);
soundButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
soundButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
soundButton
->
setIcon
(
Q
Icon
(
"theme:config/sound
.svg
"
));
soundButton
->
setIcon
(
Q
Pixmap
(
"theme:config/sound"
));
shortcutsButton
=
new
QListWidgetItem
(
contentsWidget
);
shortcutsButton
->
setTextAlignment
(
Qt
::
AlignHCenter
);
shortcutsButton
->
setFlags
(
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEnabled
);
shortcutsButton
->
setIcon
(
Q
Icon
(
"theme:config/shorcuts
.svg
"
));
shortcutsButton
->
setIcon
(
Q
Pixmap
(
"theme:config/shorcuts"
));
connect
(
contentsWidget
,
SIGNAL
(
currentItemChanged
(
QListWidgetItem
*
,
QListWidgetItem
*
)),
this
,
SLOT
(
changePage
(
QListWidgetItem
*
,
QListWidgetItem
*
)));
}
...
...
cockatrice/src/filterbuilder.cpp
View file @
a6bc7095
...
...
@@ -26,7 +26,7 @@ FilterBuilder::FilterBuilder(QWidget *parent)
QVariant
(
i
)
);
QPushButton
*
ok
=
new
QPushButton
(
Q
Icon
(
"theme:icons/increment
.svg
"
),
QString
());
QPushButton
*
ok
=
new
QPushButton
(
Q
Pixmap
(
"theme:icons/increment"
),
QString
());
ok
->
setObjectName
(
"ok"
);
ok
->
setMaximumSize
(
20
,
20
);
...
...
cockatrice/src/gameselector.cpp
View file @
a6bc7095
...
...
@@ -60,10 +60,10 @@ GameSelector::GameSelector(AbstractClient *_client, const TabSupervisor *_tabSup
gameListView
->
header
()
->
setSectionResizeMode
(
0
,
QHeaderView
::
ResizeToContents
);
#endif
filterButton
=
new
QPushButton
;
filterButton
->
setIcon
(
Q
Icon
(
"theme:icons/search
.svg
"
));
filterButton
->
setIcon
(
Q
Pixmap
(
"theme:icons/search"
));
connect
(
filterButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
actSetFilter
()));
clearFilterButton
=
new
QPushButton
;
clearFilterButton
->
setIcon
(
Q
Icon
(
"theme:icons/clearsearch
.svg
"
));
clearFilterButton
->
setIcon
(
Q
Pixmap
(
"theme:icons/clearsearch"
));
clearFilterButton
->
setEnabled
(
true
);
connect
(
clearFilterButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
actClearFilter
()));
...
...
cockatrice/src/handcounter.cpp
View file @
a6bc7095
#include
<QPainter>
#include
<QSvgRenderer>
#include
<QPixmapCache>
#include
<QGraphicsSceneMouseEvent>
#include
"handcounter.h"
...
...
@@ -36,11 +35,7 @@ void HandCounter::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
#else
if
(
!
QPixmapCache
::
find
(
"handCounter"
+
QString
::
number
(
translatedSize
.
width
()),
cachedPixmap
))
{
#endif
QSvgRenderer
svg
(
QString
(
"theme:hand.svg"
));
cachedPixmap
=
QPixmap
(
translatedSize
);
cachedPixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
cachedPixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
translatedSize
.
width
(),
translatedSize
.
height
()));
cachedPixmap
=
QPixmap
(
"theme:hand"
).
scaled
(
translatedSize
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
QPixmapCache
::
insert
(
"handCounter"
+
QString
::
number
(
translatedSize
.
width
()),
cachedPixmap
);
}
painter
->
resetTransform
();
...
...
cockatrice/src/main.cpp
View file @
a6bc7095
...
...
@@ -26,7 +26,6 @@
#include
<QTranslator>
#include
<QLibraryInfo>
#include
<QDateTime>
#include
<QIcon>
#include
<QDir>
#include
<QDesktopServices>
#include
<QDebug>
...
...
@@ -207,8 +206,7 @@ int main(int argc, char *argv[])
MainWindow
ui
;
qDebug
(
"main(): MainWindow constructor finished"
);
QIcon
icon
(
"theme:cockatrice.svg"
);
ui
.
setWindowIcon
(
icon
);
ui
.
setWindowIcon
(
QPixmap
(
"theme:cockatrice"
));
settingsCache
->
setClientID
(
generateClientID
());
...
...
cockatrice/src/pixmapgenerator.cpp
View file @
a6bc7095
#include
"pixmapgenerator.h"
#include
"pb/serverinfo_user.pb.h"
#include
<QPainter>
#include
<QSvgRenderer>
#include
<cmath>
#ifdef _WIN32
#include
"round.h"
...
...
@@ -16,12 +15,8 @@ QPixmap PhasePixmapGenerator::generatePixmap(int height, QString name)
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
QSvgRenderer
svg
(
QString
(
"theme:phases/"
+
name
+
".svg"
));
QPixmap
pixmap
(
height
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
height
,
height
));
QPixmap
pixmap
=
QPixmap
(
"theme:phases/"
+
name
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
}
...
...
@@ -36,20 +31,16 @@ QPixmap CounterPixmapGenerator::generatePixmap(int height, QString name, bool hi
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
Q
SvgRenderer
svg
(
QString
(
"theme:counters/"
+
name
+
".svg"
)
);
if
(
!
svg
.
isValid
())
{
Q
Pixmap
pixmap
=
QPixmap
(
"theme:counters/"
+
name
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
if
(
pixmap
.
isNull
())
{
name
=
"general"
;
if
(
highlight
)
name
.
append
(
"_highlight"
);
svg
.
load
(
QString
(
"theme:counters/"
+
name
+
".svg"
));
pixmap
=
QPixmap
(
"theme:counters/"
+
name
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
}
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
}
...
...
@@ -97,14 +88,8 @@ QPixmap GenderPixmapGenerator::generatePixmap(int height, int _gender)
case
ServerInfo_User
::
Female
:
genderStr
=
"female"
;
break
;
default:
genderStr
=
"unknown"
;
};
QSvgRenderer
svg
(
QString
(
"theme:genders/"
+
genderStr
+
".svg"
));
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
QPixmap
pixmap
=
QPixmap
(
"theme:genders/"
+
genderStr
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
}
...
...
@@ -119,14 +104,12 @@ QPixmap CountryPixmapGenerator::generatePixmap(int height, const QString &countr
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
QSvgRenderer
svg
(
QString
(
"theme:countries/"
+
countryCode
.
toLower
()
+
".svg"
));
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
int
width
=
height
*
2
;
QPixmap
pixmap
=
QPixmap
(
"theme:countries/"
+
countryCode
.
toLower
()).
scaled
(
width
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
painter
.
setPen
(
Qt
::
black
);
painter
.
drawRect
(
0
,
0
,
width
-
1
,
height
-
1
);
painter
.
drawRect
(
0
,
0
,
pixmap
.
width
()
-
1
,
pixmap
.
height
()
-
1
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
...
...
@@ -154,13 +137,7 @@ QPixmap UserLevelPixmapGenerator::generatePixmap(int height, UserLevelFlags user
if
(
isBuddy
)
levelString
.
append
(
"_buddy"
);
QSvgRenderer
svg
(
QString
(
"theme:userlevels/"
+
levelString
+
".svg"
));
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
QPixmap
pixmap
=
QPixmap
(
"theme:userlevels/"
+
levelString
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
}
...
...
@@ -175,13 +152,7 @@ QPixmap LockPixmapGenerator::generatePixmap(int height)
if
(
pmCache
.
contains
(
key
))
return
pmCache
.
value
(
key
);
QSvgRenderer
svg
(
QString
(
"theme:icons/lock.svg"
));
int
width
=
(
int
)
round
(
height
*
(
double
)
svg
.
defaultSize
().
width
()
/
(
double
)
svg
.
defaultSize
().
height
());
QPixmap
pixmap
(
width
,
height
);
pixmap
.
fill
(
Qt
::
transparent
);
QPainter
painter
(
&
pixmap
);
svg
.
render
(
&
painter
,
QRectF
(
0
,
0
,
width
,
height
));
QPixmap
pixmap
=
QPixmap
(
"theme:icons/lock"
).
scaled
(
height
,
height
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
pmCache
.
insert
(
key
,
pixmap
);
return
pixmap
;
}
...
...
cockatrice/src/playerlistwidget.cpp
View file @
a6bc7095
...
...
@@ -50,12 +50,12 @@ bool PlayerListTWI::operator<(const QTreeWidgetItem &other) const
PlayerListWidget
::
PlayerListWidget
(
TabSupervisor
*
_tabSupervisor
,
AbstractClient
*
_client
,
TabGame
*
_game
,
QWidget
*
parent
)
:
QTreeWidget
(
parent
),
tabSupervisor
(
_tabSupervisor
),
client
(
_client
),
game
(
_game
),
gameStarted
(
false
)
{
readyIcon
=
Q
Icon
(
"theme:icons/ready_start
.svg
"
);
notReadyIcon
=
Q
Icon
(
"theme:icons/not_ready_start
.svg
"
);
concededIcon
=
Q
Icon
(
"theme:icons/conceded
.svg
"
);
playerIcon
=
Q
Icon
(
"theme:icons/player
.svg
"
);
spectatorIcon
=
Q
Icon
(
"theme:icons/spectator
.svg
"
);
lockIcon
=
Q
Icon
(
"theme:icons/lock
.svg
"
);
readyIcon
=
Q
Pixmap
(
"theme:icons/ready_start"
);
notReadyIcon
=
Q
Pixmap
(
"theme:icons/not_ready_start"
);
concededIcon
=
Q
Pixmap
(
"theme:icons/conceded"
);
playerIcon
=
Q
Pixmap
(
"theme:icons/player"
);
spectatorIcon
=
Q
Pixmap
(
"theme:icons/spectator"
);
lockIcon
=
Q
Pixmap
(
"theme:icons/lock"
);
if
(
tabSupervisor
)
{
itemDelegate
=
new
PlayerListItemDelegate
(
this
);
...
...
cockatrice/src/remotereplaylist_treewidget.cpp
View file @
a6bc7095
...
...
@@ -35,7 +35,7 @@ RemoteReplayList_TreeModel::RemoteReplayList_TreeModel(AbstractClient *_client,
QFileIconProvider
fip
;
dirIcon
=
fip
.
icon
(
QFileIconProvider
::
Folder
);
fileIcon
=
fip
.
icon
(
QFileIconProvider
::
File
);
lockIcon
=
Q
Icon
(
"theme:icons/lock
.svg
"
);
lockIcon
=
Q
Pixmap
(
"theme:icons/lock"
);
refreshTree
();
}
...
...
cockatrice/src/sequenceEdit/sequenceedit.cpp
View file @
a6bc7095
...
...
@@ -25,8 +25,8 @@ SequenceEdit::SequenceEdit(QString _shorcutName, QWidget *parent) : QWidget(pare
clearButton
->
setMaximumHeight
(
lineEdit
->
height
());
defaultButton
->
setMaximumHeight
(
lineEdit
->
height
());
clearButton
->
setIcon
(
Q
Icon
(
"theme:icons/clearsearch
.svg
"
));
defaultButton
->
setIcon
(
Q
Icon
(
"theme:icons/update
.png
"
));
clearButton
->
setIcon
(
Q
Pixmap
(
"theme:icons/clearsearch"
));
defaultButton
->
setIcon
(
Q
Pixmap
(
"theme:icons/update"
));
clearButton
->
setAttribute
(
Qt
::
WA_LayoutUsesWidgetRect
);
defaultButton
->
setAttribute
(
Qt
::
WA_LayoutUsesWidgetRect
);
...
...
cockatrice/src/tab_deck_editor.cpp
View file @
a6bc7095
...
...
@@ -53,21 +53,21 @@ void SearchLineEdit::keyPressEvent(QKeyEvent *event)
void
TabDeckEditor
::
createShowHideDocksButtons
()
{
btnFilter
=
new
QPushButton
(
Q
Icon
(
"theme:icons/view
.svg
"
),
QString
());
btnFilter
=
new
QPushButton
(
Q
Pixmap
(
"theme:icons/view"
),
QString
());
btnFilter
->
setObjectName
(
"btnFilter"
);
btnFilter
->
setCheckable
(
true
);
btnFilter
->
setChecked
(
true
);
btnFilter
->
setMaximumWidth
(
30
);
searchLayout
->
addWidget
(
btnFilter
);
btnDeck
=
new
QPushButton
(
Q
Icon
(
"theme:hand
.svg
"
),
QString
());
btnDeck
=
new
QPushButton
(
Q
Pixmap
(
"theme:hand"
),
QString
());
btnDeck
->
setObjectName
(
"btnDeck"
);
btnDeck
->
setCheckable
(
true
);
btnDeck
->
setChecked
(
true
);
btnDeck
->
setMaximumWidth
(
30
);
searchLayout
->
addWidget
(
btnDeck
);
btnCard
=
new
QPushButton
(
Q
Icon
(
"theme:back
.svg
"
),
QString
());
btnCard
=
new
QPushButton
(
Q
Pixmap
(
"theme:
card
back"
),
QString
());
btnCard
->
setObjectName
(
"btnCard"
);
btnCard
->
setCheckable
(
true
);
btnCard
->
setChecked
(
true
);
...
...
@@ -134,7 +134,7 @@ void TabDeckEditor::createDeckDock()
/* Update price
aUpdatePrices = new QAction(QString(), this);
aUpdatePrices->setIcon(Q
Icon
("theme:icons/update
.png
"));
aUpdatePrices->setIcon(Q
Pixmap
("theme:icons/update"));
connect(aUpdatePrices, SIGNAL(triggered()), this, SLOT(actUpdatePrices()));
if (!settingsCache->getPriceTagFeature())
aUpdatePrices->setVisible(false);
...
...
@@ -318,11 +318,11 @@ void TabDeckEditor::createMenus()
addTabMenu
(
deckMenu
);
aClearFilterAll
=
new
QAction
(
QString
(),
this
);
aClearFilterAll
->
setIcon
(
Q
Icon
(
"theme:icons/clearsearch
.svg
"
));
aClearFilterAll
->
setIcon
(
Q
Pixmap
(
"theme:icons/clearsearch"
));
connect
(
aClearFilterAll
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterAll
()));
aClearFilterOne
=
new
QAction
(
QString
(),
this
);
aClearFilterOne
->
setIcon
(
Q
Icon
(
"theme:icons/decrement
.svg
"
));
aClearFilterOne
->
setIcon
(
Q
Pixmap
(
"theme:icons/decrement"
));
connect
(
aClearFilterOne
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actClearFilterOne
()));
dbMenu
=
new
QMenu
(
this
);
...
...
@@ -344,7 +344,7 @@ void TabDeckEditor::createCentralFrame()
searchEdit
=
new
SearchLineEdit
;
searchEdit
->
setObjectName
(
"searchEdit"
);
#if QT_VERSION >= 0x050300
searchEdit
->
addAction
(
Q
Icon
(
"theme:icons/search
.svg
"
),
QLineEdit
::
LeadingPosition
);
searchEdit
->
addAction
(
Q
Pixmap
(
"theme:icons/search"
),
QLineEdit
::
LeadingPosition
);
#endif
setFocusProxy
(
searchEdit
);
...
...
@@ -383,19 +383,19 @@ void TabDeckEditor::createCentralFrame()
searchEdit
->
setTreeView
(
databaseView
);
aAddCard
=
new
QAction
(
QString
(),
this
);
aAddCard
->
setIcon
(
Q
Icon
(
"theme:icons/arrow_right_green
.svg
"
));
aAddCard
->
setIcon
(
Q
Pixmap
(
"theme:icons/arrow_right_green"
));
connect
(
aAddCard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAddCard
()));
aAddCardToSideboard
=
new
QAction
(
QString
(),
this
);
aAddCardToSideboard
->
setIcon
(
Q
Icon
(
"theme:icons/arrow_right_blue
.svg
"
));
aAddCardToSideboard
->
setIcon
(
Q
Pixmap
(
"theme:icons/arrow_right_blue"
));
connect
(
aAddCardToSideboard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAddCardToSideboard
()));
aRemoveCard
=
new
QAction
(
QString
(),
this
);
aRemoveCard
->
setIcon
(
Q
Icon
(
"theme:icons/remove_row
.svg
"
));
aRemoveCard
->
setIcon
(
Q
Pixmap
(
"theme:icons/remove_row"
));
connect
(
aRemoveCard
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actRemoveCard
()));
aIncrement
=
new
QAction
(
QString
(),
this
);
aIncrement
->
setIcon
(
Q
Icon
(
"theme:icons/increment
.svg
"
));
aIncrement
->
setIcon
(
Q
Pixmap
(
"theme:icons/increment"
));
connect
(
aIncrement
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actIncrement
()));
aDecrement
=
new
QAction
(
QString
(),
this
);
aDecrement
->
setIcon
(
Q
Icon
(
"theme:icons/decrement
.svg
"
));
aDecrement
->
setIcon
(
Q
Pixmap
(
"theme:icons/decrement"
));
connect
(
aDecrement
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDecrement
()));
QToolBar
*
deckEditToolBar
=
new
QToolBar
;
...
...
cockatrice/src/tab_deck_storage.cpp
View file @
a6bc7095
...
...
@@ -80,25 +80,25 @@ TabDeckStorage::TabDeckStorage(TabSupervisor *_tabSupervisor, AbstractClient *_c
hbox
->
addWidget
(
rightGroupBox
);
aOpenLocalDeck
=
new
QAction
(
this
);
aOpenLocalDeck
->
setIcon
(
Q
Icon
(
"theme:icons/pencil
.svg
"
));
aOpenLocalDeck
->
setIcon
(
Q
Pixmap
(
"theme:icons/pencil"
));
connect
(
aOpenLocalDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenLocalDeck
()));
aUpload
=
new
QAction
(
this
);
aUpload
->
setIcon
(
Q
Icon
(
"theme:icons/arrow_right_green
.svg
"
));
aUpload
->
setIcon
(
Q
Pixmap
(
"theme:icons/arrow_right_green"
));
connect
(
aUpload
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actUpload
()));
aDeleteLocalDeck
=
new
QAction
(
this
);
aDeleteLocalDeck
->
setIcon
(
Q
Icon
(
"theme:icons/remove_row
.svg
"
));
aDeleteLocalDeck
->
setIcon
(
Q
Pixmap
(
"theme:icons/remove_row"
));
connect
(
aDeleteLocalDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDeleteLocalDeck
()));
aOpenRemoteDeck
=
new
QAction
(
this
);
aOpenRemoteDeck
->
setIcon
(
Q
Icon
(
"theme:icons/pencil
.svg
"
));
aOpenRemoteDeck
->
setIcon
(
Q
Pixmap
(
"theme:icons/pencil"
));
connect
(
aOpenRemoteDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenRemoteDeck
()));
aDownload
=
new
QAction
(
this
);
aDownload
->
setIcon
(
Q
Icon
(
"theme:icons/arrow_left_green
.svg
"
));
aDownload
->
setIcon
(
Q
Pixmap
(
"theme:icons/arrow_left_green"
));
connect
(
aDownload
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDownload
()));
aNewFolder
=
new
QAction
(
this
);
aNewFolder
->
setIcon
(
qApp
->
style
()
->
standardIcon
(
QStyle
::
SP_FileDialogNewFolder
));
connect
(
aNewFolder
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actNewFolder
()));
aDeleteRemoteDeck
=
new
QAction
(
this
);
aDeleteRemoteDeck
->
setIcon
(
Q
Icon
(
"theme:icons/remove_row
.svg
"
));
aDeleteRemoteDeck
->
setIcon
(
Q
Pixmap
(
"theme:icons/remove_row"
));
connect
(
aDeleteRemoteDeck
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDeleteRemoteDeck
()));
leftToolBar
->
addAction
(
aOpenLocalDeck
);
...
...
cockatrice/src/tab_game.cpp
View file @
a6bc7095
...
...
@@ -363,17 +363,17 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
replayStartButton
=
new
QToolButton
;
replayStartButton
->
setIconSize
(
QSize
(
32
,
32
));
replayStartButton
->
setIcon
(
Q
Icon
(
"theme:replay/start
.svg
"
));
replayStartButton
->
setIcon
(
Q
Pixmap
(
"theme:replay/start"
));
connect
(
replayStartButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
replayStartButtonClicked
()));
replayPauseButton
=
new
QToolButton
;
replayPauseButton
->
setIconSize
(
QSize
(
32
,
32
));
replayPauseButton
->
setEnabled
(
false
);
replayPauseButton
->
setIcon
(
Q
Icon
(
"theme:replay/pause
.svg
"
));
replayPauseButton
->
setIcon
(
Q
Pixmap
(
"theme:replay/pause"
));
connect
(
replayPauseButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
replayPauseButtonClicked
()));
replayFastForwardButton
=
new
QToolButton
;
replayFastForwardButton
->
setIconSize
(
QSize
(
32
,
32
));
replayFastForwardButton
->
setEnabled
(
false
);
replayFastForwardButton
->
setIcon
(
Q
Icon
(
"theme:replay/fastforward
.svg
"
));
replayFastForwardButton
->
setIcon
(
Q
Pixmap
(
"theme:replay/fastforward"
));
replayFastForwardButton
->
setCheckable
(
true
);
connect
(
replayFastForwardButton
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
replayFastForwardButtonToggled
(
bool
)));
...
...
cockatrice/src/tab_replays.cpp
View file @
a6bc7095
...
...
@@ -78,24 +78,24 @@ TabReplays::TabReplays(TabSupervisor *_tabSupervisor, AbstractClient *_client)
hbox
->
addWidget
(
rightGroupBox
);
aOpenLocalReplay
=
new
QAction
(
this
);
aOpenLocalReplay
->
setIcon
(
Q
Icon
(
"theme:icons/view
.svg
"
));
aOpenLocalReplay
->
setIcon
(
Q
Pixmap
(
"theme:icons/view"
));
connect
(
aOpenLocalReplay
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenLocalReplay
()));
connect
(
localDirView
,
SIGNAL
(
doubleClicked
(
const
QModelIndex
&
)),
this
,
SLOT
(
actOpenLocalReplay
()));
aDeleteLocalReplay
=
new
QAction
(
this
);
aDeleteLocalReplay
->
setIcon
(
Q
Icon
(
"theme:icons/remove_row
.svg
"
));
aDeleteLocalReplay
->
setIcon
(
Q
Pixmap
(
"theme:icons/remove_row"
));
connect
(
aDeleteLocalReplay
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDeleteLocalReplay
()));
aOpenRemoteReplay
=
new
QAction
(
this
);
aOpenRemoteReplay
->
setIcon
(
Q
Icon
(
"theme:icons/view
.svg
"
));
aOpenRemoteReplay
->
setIcon
(
Q
Pixmap
(
"theme:icons/view"
));
connect
(
aOpenRemoteReplay
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenRemoteReplay
()));
connect
(
serverDirView
,
SIGNAL
(
doubleClicked
(
const
QModelIndex
&
)),
this
,
SLOT
(
actOpenRemoteReplay
()));
aDownload
=
new
QAction
(
this
);
aDownload
->
setIcon
(
Q
Icon
(
"theme:icons/arrow_left_green
.svg
"
));
aDownload
->
setIcon
(
Q
Pixmap
(
"theme:icons/arrow_left_green"
));
connect
(
aDownload
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDownload
()));
aKeep
=
new
QAction
(
this
);
aKeep
->
setIcon
(
Q
Icon
(
"theme:icons/lock
.svg
"
));
aKeep
->
setIcon
(
Q
Pixmap
(
"theme:icons/lock"
));
connect
(
aKeep
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actKeepRemoteReplay
()));
aDeleteRemoteReplay
=
new
QAction
(
this
);
aDeleteRemoteReplay
->
setIcon
(
Q
Icon
(
"theme:icons/remove_row
.svg
"
));
aDeleteRemoteReplay
->
setIcon
(
Q
Pixmap
(
"theme:icons/remove_row"
));
connect
(
aDeleteRemoteReplay
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actDeleteRemoteReplay
()));
leftToolBar
->
addAction
(
aOpenLocalReplay
);
...
...
cockatrice/src/tab_room.cpp
View file @
a6bc7095
...
...
@@ -71,7 +71,7 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
connect
(
aOpenChatSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actOpenChatSettings
()));
QToolButton
*
chatSettingsButton
=
new
QToolButton
;
chatSettingsButton
->
setIcon
(
Q
Icon
(
"theme:icons/settings
.svg
"
));
chatSettingsButton
->
setIcon
(
Q
Pixmap
(
"theme:icons/settings"
));
chatSettingsButton
->
setMenu
(
chatSettingsMenu
);
chatSettingsButton
->
setPopupMode
(
QToolButton
::
InstantPopup
);
...
...
Prev
1
2
Next
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