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
bcf92fc5
Commit
bcf92fc5
authored
Nov 15, 2010
by
Max-Wilhelm Bruker
Browse files
changed some config defaults, added about box
parent
0fdc01f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/main.h
View file @
bcf92fc5
...
@@ -8,6 +8,7 @@ extern CardDatabase *db;
...
@@ -8,6 +8,7 @@ extern CardDatabase *db;
extern
QTranslator
*
translator
;
extern
QTranslator
*
translator
;
const
QString
translationPrefix
=
"cockatrice"
;
const
QString
translationPrefix
=
"cockatrice"
;
const
QString
versionString
=
"0.20101115"
;
void
installNewTranslator
();
void
installNewTranslator
();
...
...
cockatrice/src/settingscache.cpp
View file @
bcf92fc5
...
@@ -17,16 +17,16 @@ SettingsCache::SettingsCache()
...
@@ -17,16 +17,16 @@ SettingsCache::SettingsCache()
playerBgPath
=
settings
->
value
(
"zonebg/playerarea"
).
toString
();
playerBgPath
=
settings
->
value
(
"zonebg/playerarea"
).
toString
();
cardBackPicturePath
=
settings
->
value
(
"paths/cardbackpicture"
).
toString
();
cardBackPicturePath
=
settings
->
value
(
"paths/cardbackpicture"
).
toString
();
picDownload
=
settings
->
value
(
"personal/picturedownload"
,
fals
e
).
toBool
();
picDownload
=
settings
->
value
(
"personal/picturedownload"
,
tru
e
).
toBool
();
doubleClickToPlay
=
settings
->
value
(
"interface/doubleclicktoplay"
,
true
).
toBool
();
doubleClickToPlay
=
settings
->
value
(
"interface/doubleclicktoplay"
,
true
).
toBool
();
cardInfoMinimized
=
settings
->
value
(
"interface/cardinfominimized"
,
false
).
toBool
();
cardInfoMinimized
=
settings
->
value
(
"interface/cardinfominimized"
,
false
).
toBool
();
horizontalHand
=
settings
->
value
(
"hand/horizontal"
,
fals
e
).
toBool
();
horizontalHand
=
settings
->
value
(
"hand/horizontal"
,
tru
e
).
toBool
();
economicalGrid
=
settings
->
value
(
"table/economic"
,
false
).
toBool
();
economicalGrid
=
settings
->
value
(
"table/economic"
,
false
).
toBool
();
invertVerticalCoordinate
=
settings
->
value
(
"table/invert_vertical"
,
false
).
toBool
();
invertVerticalCoordinate
=
settings
->
value
(
"table/invert_vertical"
,
false
).
toBool
();
tapAnimation
=
settings
->
value
(
"cards/tapanimation"
,
true
).
toBool
();
tapAnimation
=
settings
->
value
(
"cards/tapanimation"
,
true
).
toBool
();
zoneViewSortByName
=
settings
->
value
(
"zoneview/sortbyname"
,
fals
e
).
toBool
();
zoneViewSortByName
=
settings
->
value
(
"zoneview/sortbyname"
,
tru
e
).
toBool
();
zoneViewSortByType
=
settings
->
value
(
"zoneview/sortbytype"
,
fals
e
).
toBool
();
zoneViewSortByType
=
settings
->
value
(
"zoneview/sortbytype"
,
tru
e
).
toBool
();
}
}
void
SettingsCache
::
setLang
(
const
QString
&
_lang
)
void
SettingsCache
::
setLang
(
const
QString
&
_lang
)
...
...
cockatrice/src/window_main.cpp
View file @
bcf92fc5
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include
<QPixmapCache>
#include
<QPixmapCache>
#include
<QInputDialog>
#include
<QInputDialog>
#include
"main.h"
#include
"window_main.h"
#include
"window_main.h"
#include
"dlg_connect.h"
#include
"dlg_connect.h"
#include
"dlg_settings.h"
#include
"dlg_settings.h"
...
@@ -43,7 +44,7 @@ void MainWindow::updateTabMenu(QMenu *menu)
...
@@ -43,7 +44,7 @@ void MainWindow::updateTabMenu(QMenu *menu)
menuBar
()
->
removeAction
(
tabMenu
->
menuAction
());
menuBar
()
->
removeAction
(
tabMenu
->
menuAction
());
tabMenu
=
menu
;
tabMenu
=
menu
;
if
(
menu
)
if
(
menu
)
menuBar
()
->
addMenu
(
menu
);
menuBar
()
->
insertMenu
(
helpMenu
->
menuAction
(),
menu
);
}
}
void
MainWindow
::
statusChanged
(
ClientStatus
_status
)
void
MainWindow
::
statusChanged
(
ClientStatus
_status
)
...
@@ -147,6 +148,11 @@ void MainWindow::actExit()
...
@@ -147,6 +148,11 @@ void MainWindow::actExit()
close
();
close
();
}
}
void
MainWindow
::
actAbout
()
{
QMessageBox
::
about
(
this
,
tr
(
"About Cockatrice"
),
trUtf8
(
"<font size=
\"
8
\"
><b>Cockatrice</b></font><br>Version %1<br><br><br><b>Authors:</b><br>Max-Wilhelm Bruker<br>Marcus Schütz<br>Marius van Zundert<br><br><b>Translators:</b><br>Spanish: Gocho<br>"
).
arg
(
versionString
));
}
void
MainWindow
::
serverTimeout
()
void
MainWindow
::
serverTimeout
()
{
{
QMessageBox
::
critical
(
this
,
tr
(
"Error"
),
tr
(
"Server timeout"
));
QMessageBox
::
critical
(
this
,
tr
(
"Error"
),
tr
(
"Server timeout"
));
...
@@ -195,6 +201,9 @@ void MainWindow::retranslateUi()
...
@@ -195,6 +201,9 @@ void MainWindow::retranslateUi()
cockatriceMenu
->
setTitle
(
tr
(
"&Cockatrice"
));
cockatriceMenu
->
setTitle
(
tr
(
"&Cockatrice"
));
aAbout
->
setText
(
tr
(
"&About Cockatrice"
));
helpMenu
->
setTitle
(
tr
(
"&Help"
));
tabSupervisor
->
retranslateUi
();
tabSupervisor
->
retranslateUi
();
}
}
...
@@ -216,6 +225,9 @@ void MainWindow::createActions()
...
@@ -216,6 +225,9 @@ void MainWindow::createActions()
connect
(
aSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSettings
()));
connect
(
aSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actSettings
()));
aExit
=
new
QAction
(
this
);
aExit
=
new
QAction
(
this
);
connect
(
aExit
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actExit
()));
connect
(
aExit
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actExit
()));
aAbout
=
new
QAction
(
this
);
connect
(
aAbout
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
actAbout
()));
}
}
void
MainWindow
::
createMenus
()
void
MainWindow
::
createMenus
()
...
@@ -232,6 +244,9 @@ void MainWindow::createMenus()
...
@@ -232,6 +244,9 @@ void MainWindow::createMenus()
cockatriceMenu
->
addAction
(
aSettings
);
cockatriceMenu
->
addAction
(
aSettings
);
cockatriceMenu
->
addSeparator
();
cockatriceMenu
->
addSeparator
();
cockatriceMenu
->
addAction
(
aExit
);
cockatriceMenu
->
addAction
(
aExit
);
helpMenu
=
menuBar
()
->
addMenu
(
QString
());
helpMenu
->
addAction
(
aAbout
);
}
}
MainWindow
::
MainWindow
(
QWidget
*
parent
)
MainWindow
::
MainWindow
(
QWidget
*
parent
)
...
...
cockatrice/src/window_main.h
View file @
bcf92fc5
...
@@ -47,14 +47,17 @@ private slots:
...
@@ -47,14 +47,17 @@ private slots:
void
actFullScreen
(
bool
checked
);
void
actFullScreen
(
bool
checked
);
void
actSettings
();
void
actSettings
();
void
actExit
();
void
actExit
();
void
actAbout
();
private:
private:
static
const
QString
appName
;
static
const
QString
appName
;
void
setClientStatusTitle
();
void
setClientStatusTitle
();
void
retranslateUi
();
void
retranslateUi
();
void
createActions
();
void
createActions
();
void
createMenus
();
void
createMenus
();
QMenu
*
cockatriceMenu
,
*
tabMenu
;
QMenu
*
cockatriceMenu
,
*
tabMenu
,
*
helpMenu
;
QAction
*
aConnect
,
*
aDisconnect
,
*
aSinglePlayer
,
*
aDeckEditor
,
*
aFullScreen
,
*
aSettings
,
*
aExit
;
QAction
*
aConnect
,
*
aDisconnect
,
*
aSinglePlayer
,
*
aDeckEditor
,
*
aFullScreen
,
*
aSettings
,
*
aExit
,
*
aAbout
;
TabSupervisor
*
tabSupervisor
;
TabSupervisor
*
tabSupervisor
;
RemoteClient
*
client
;
RemoteClient
*
client
;
...
...
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