summaryrefslogtreecommitdiffstats
path: root/examples/tools
diff options
context:
space:
mode:
authorIan Walters <ian.walters@nokia.com>2009-05-14 14:24:59 +1000
committerIan Walters <ian.walters@nokia.com>2009-05-14 14:24:59 +1000
commita8e4628a1f74b52a61b11b4b1fcc8ccdd4002a46 (patch)
treebac5b6e440ac7e5c7f9fe1eee53a75fb44a7e9dd /examples/tools
parentdf69dfe0ec549a259ed78cf48dff898d8a044c41 (diff)
parent9820412d2551b655fec24ffde7b2a56e3ad168ea (diff)
Merge branch 'master' of ../master into contiguouscache
Diffstat (limited to 'examples/tools')
-rw-r--r--examples/tools/codecs/mainwindow.cpp4
-rw-r--r--examples/tools/plugandpaint/mainwindow.cpp6
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp4
-rw-r--r--examples/tools/undoframework/mainwindow.cpp8
4 files changed, 10 insertions, 12 deletions
diff --git a/examples/tools/codecs/mainwindow.cpp b/examples/tools/codecs/mainwindow.cpp
index 1e6fa6954..5d3b7acb5 100644
--- a/examples/tools/codecs/mainwindow.cpp
+++ b/examples/tools/codecs/mainwindow.cpp
@@ -156,7 +156,7 @@ void MainWindow::findCodecs()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
foreach (QTextCodec *codec, codecs) {
@@ -169,7 +169,7 @@ void MainWindow::createActions()
}
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
aboutAct = new QAction(tr("&About"), this);
diff --git a/examples/tools/plugandpaint/mainwindow.cpp b/examples/tools/plugandpaint/mainwindow.cpp
index 224bc71e0..f61359b92 100644
--- a/examples/tools/plugandpaint/mainwindow.cpp
+++ b/examples/tools/plugandpaint/mainwindow.cpp
@@ -179,15 +179,15 @@ void MainWindow::aboutPlugins()
void MainWindow::createActions()
{
openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcut(tr("Ctrl+O"));
+ openAct->setShortcuts(QKeySequence::Open);
connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
saveAsAct = new QAction(tr("&Save As..."), this);
- saveAsAct->setShortcut(tr("Ctrl+S"));
+ saveAsAct->setShortcuts(QKeySequence::SaveAs);
connect(saveAsAct, SIGNAL(triggered()), this, SLOT(saveAs()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
brushColorAct = new QAction(tr("&Brush Color..."), this);
diff --git a/examples/tools/settingseditor/mainwindow.cpp b/examples/tools/settingseditor/mainwindow.cpp
index 0f48a5c39..0321b5565 100644
--- a/examples/tools/settingseditor/mainwindow.cpp
+++ b/examples/tools/settingseditor/mainwindow.cpp
@@ -122,7 +122,7 @@ void MainWindow::about()
void MainWindow::createActions()
{
openSettingsAct = new QAction(tr("&Open Application Settings..."), this);
- openSettingsAct->setShortcut(tr("Ctrl+O"));
+ openSettingsAct->setShortcuts(QKeySequence::Open);
connect(openSettingsAct, SIGNAL(triggered()), this, SLOT(openSettings()));
openIniFileAct = new QAction(tr("Open I&NI File..."), this);
@@ -146,7 +146,7 @@ void MainWindow::createActions()
connect(refreshAct, SIGNAL(triggered()), settingsTree, SLOT(refresh()));
exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcut(tr("Ctrl+Q"));
+ exitAct->setShortcuts(QKeySequence::Quit);
connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
autoRefreshAct = new QAction(tr("&Auto-Refresh"), this);
diff --git a/examples/tools/undoframework/mainwindow.cpp b/examples/tools/undoframework/mainwindow.cpp
index f912ff2bb..bf0aa41fe 100644
--- a/examples/tools/undoframework/mainwindow.cpp
+++ b/examples/tools/undoframework/mainwindow.cpp
@@ -101,16 +101,14 @@ void MainWindow::createActions()
//! [5]
undoAction = undoStack->createUndoAction(this, tr("&Undo"));
- undoAction->setShortcut(tr("Ctrl+Z"));
+ undoAction->setShortcuts(QKeySequence::Undo);
redoAction = undoStack->createRedoAction(this, tr("&Redo"));
- QList<QKeySequence> redoShortcuts;
- redoShortcuts << tr("Ctrl+Y") << tr("Shift+Ctrl+Z");
- redoAction->setShortcuts(redoShortcuts);
+ redoAction->setShortcuts(QKeySequence::Redo);
//! [5]
exitAction = new QAction(tr("E&xit"), this);
- exitAction->setShortcut(tr("Ctrl+Q"));
+ exitAction->setShortcuts(QKeySequence::Quit);
connect(exitAction, SIGNAL(triggered()), this, SLOT(close()));
aboutAction = new QAction(tr("&About"), this);