mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
initial commit for settings dialog, unfinished
This commit is contained in:
parent
84f06503c6
commit
f703004b6c
10 changed files with 261 additions and 118 deletions
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "window_main.h"
|
||||
#include "dlg_connect.h"
|
||||
#include "dlg_settings.h"
|
||||
#include "gameselector.h"
|
||||
#include "window_deckeditor.h"
|
||||
#include "cardinfowidget.h"
|
||||
|
|
@ -130,6 +131,12 @@ void MainWindow::actFullScreen(bool checked)
|
|||
setWindowState(windowState() & ~Qt::WindowFullScreen);
|
||||
}
|
||||
|
||||
void MainWindow::actSettings()
|
||||
{
|
||||
DlgSettings dlg;
|
||||
dlg.exec();
|
||||
}
|
||||
|
||||
void MainWindow::actExit()
|
||||
{
|
||||
close();
|
||||
|
|
@ -193,6 +200,8 @@ void MainWindow::createActions()
|
|||
aFullScreen->setShortcut(tr("Ctrl+F"));
|
||||
aFullScreen->setCheckable(true);
|
||||
connect(aFullScreen, SIGNAL(toggled(bool)), this, SLOT(actFullScreen(bool)));
|
||||
aSettings = new QAction(tr("&Settings..."), this);
|
||||
connect(aSettings, SIGNAL(triggered()), this, SLOT(actSettings()));
|
||||
aExit = new QAction(tr("&Exit"), this);
|
||||
connect(aExit, SIGNAL(triggered()), this, SLOT(actExit()));
|
||||
|
||||
|
|
@ -215,6 +224,8 @@ void MainWindow::createMenus()
|
|||
gameMenu->addSeparator();
|
||||
gameMenu->addAction(aFullScreen);
|
||||
gameMenu->addSeparator();
|
||||
gameMenu->addAction(aSettings);
|
||||
gameMenu->addSeparator();
|
||||
gameMenu->addAction(aExit);
|
||||
|
||||
actionsMenu = menuBar()->addMenu(tr("&Actions"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue