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