X-Git-Url: http://git.maemo.org/git/?p=qquiz;a=blobdiff_plain;f=src%2Fquiz.cpp;h=e0b31f8c64d18e6da60ee1eb1e21791de03e9e2f;hp=967c8965936d26fa1fe92219d0762a4b7ef53f24;hb=513938eb61a8fa96bb3a64ef8006069097305f21;hpb=d18ce2240e55c4ea167add0641ed422fb19acc5e diff --git a/src/quiz.cpp b/src/quiz.cpp index 967c896..e0b31f8 100644 --- a/src/quiz.cpp +++ b/src/quiz.cpp @@ -31,15 +31,21 @@ question::~question() { quiz::quiz() : current(NULL), subset(0), correct(0) { QAction *choose; + QAction *about; window = new QWidget(); - window->setWindowTitle(QApplication::translate("Qtquiz", "Qtquiz")); + window->setWindowTitle(QApplication::translate("Qquiz", "Qquiz")); menu = new QMenuBar(window); choose = new QAction("Open", window); QObject::connect(choose, SIGNAL(triggered()), this, SLOT(choose_quiz())); + about = new QAction("About", window); + QObject::connect(about, SIGNAL(triggered()), this, SLOT(about())); + menu->addAction(choose); + menu->addAction(about); + window->resize(DEFAULT_WIDTH, DEFAULT_HEIGHT); window->show(); retrieve_quizzes(); @@ -438,3 +444,17 @@ void quiz::end() { } } } + +void quiz::about() { + QString message = ""; + QString version; + + message.append(APP_NAME); + message.append("-"); + version = version.setNum(APP_VERSION); + message.append(version); + message.append("\n by "); + message.append(AUTHOR); + QMessageBox::about ( window, tr("About"), message); +} +