All pastes #807956 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-07 04:21 UTC
rendered paste body
#include "DiskUtility.h"

DiskUtility::DiskUtility() {
        this->createActions();
        this->createMenus();
        this->createLayout();

        setWindowIcon(QIcon(":/icons/appicon.png"));
}

void DiskUtility::about() {
            QMessageBox::about(this, tr("About Application"),
                         tr("<b>Disk Utility</b><br /><br />"
                                "Author: Gregory Haynes &#060;greg@greghaynes.net&#062;<br />"
                                "This software is released under the GNU GPL"));
}

void DiskUtility::createActions() {
        if (QIcon(":/icons/save.png").isNull())
                std::cout << "Poo!";

        CommitAction = new QAction(QIcon(":/icons/save.png"), tr("&Commit Changes"), this);
        CommitAction->setShortcut((tr("Ctrl+S")));

        RestoreAction = new QAction(tr("&Restore State"), this);

        ExitAction = new QAction(QIcon(":/icons/exit.png"), tr("E&xit"), this);
        ExitAction->setShortcut(tr("Ctrl+Q"));
        connect(ExitAction, SIGNAL(triggered()), this, SLOT(close()));

        AboutAction = new QAction(tr("&About"), this);
        connect(AboutAction, SIGNAL(triggered()), this, SLOT(about()));

        AboutQtAction = new QAction(tr("About Qt"), this);
        connect(AboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
}