diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index 776ebdf..59ef7bc 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -6,6 +6,7 @@ set (glabels_sources glabels_main.cpp BarcodeStyle.cpp ColorNode.cpp + Help.cpp LabelModel.cpp LabelModelItem.cpp LabelRegion.cpp diff --git a/app/Help.cpp b/app/Help.cpp new file mode 100644 index 0000000..9eb62e9 --- /dev/null +++ b/app/Help.cpp @@ -0,0 +1,61 @@ +/* Help.cpp + * + * Copyright (C) 2013 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#include "Help.h" + +#include + +#include + + +namespace gLabels +{ + + namespace Help + { + + void displayContents( QWidget *parent ) + { + std::cout << "TODO: Help::displayContents" << std::endl; + } + + + void displayAbout( QWidget *parent ) + { + QMessageBox aboutBox( QMessageBox::NoIcon, + QMessageBox::tr("About gLabels"), + QMessageBox::tr("

gLabels-qt

" + "

x.x.x

" + "

A label and business card creation program.

" + "" + "

Homepage

" + "

Copyright © 2013 Jim Evins

" + "
"), + QMessageBox::Ok, + parent ); + aboutBox.setIconPixmap( QPixmap( ":/images/glabels-logo.png" ) ); + + aboutBox.exec(); + } + + } + +} + diff --git a/app/Help.h b/app/Help.h new file mode 100644 index 0000000..c4a294c --- /dev/null +++ b/app/Help.h @@ -0,0 +1,39 @@ +/* Help.h + * + * Copyright (C) 2013 Jim Evins + * + * This file is part of gLabels-qt. + * + * gLabels-qt is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * gLabels-qt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with gLabels-qt. If not, see . + */ + +#ifndef glabels_Help_h +#define glabels_Help_h + + +#include + + +namespace gLabels +{ + + namespace Help + { + void displayContents( QWidget *parent ); + void displayAbout( QWidget *parent ); + } + +} + +#endif // glabels_Help_h diff --git a/app/MainWindow.cpp b/app/MainWindow.cpp index 60052c6..38a3753 100644 --- a/app/MainWindow.cpp +++ b/app/MainWindow.cpp @@ -21,11 +21,11 @@ #include "MainWindow.h" #include -#include #include #include "Icons.h" +#include "Help.h" namespace gLabels @@ -698,26 +698,13 @@ namespace gLabels void MainWindow::helpContents() { - std::cout << "ACTION: help->Contents" << std::endl; + Help::displayContents( this ); } void MainWindow::helpAbout() { - QMessageBox aboutBox( QMessageBox::NoIcon, - tr("About gLabels"), - tr("

gLabels-qt

" - "

x.x.x

" - "

A label and business card creation program.

" - "" - "

Homepage

" - "

Copyright © 2013 Jim Evins

" - "
"), - QMessageBox::Ok, - this ); - aboutBox.setIconPixmap( QPixmap( ":/images/glabels-logo.png" ) ); - - aboutBox.exec(); + Help::displayAbout( this ); } }