From 8b09673d06cc46e65f049748359c298f1b21273b Mon Sep 17 00:00:00 2001 From: ruglory Date: Fri, 23 Jan 2009 23:09:12 +0000 Subject: [PATCH] abouts added git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@7 cac9541e-1b8d-4bfa-827e-589bba606050 --- src/mainwindow.cpp | 28 +++++++++++++++++----------- src/mainwindow.h | 3 ++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 728d471..598022b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - $Id:$ */ + $Id$ */ #include "mainwindow.h" #include "qgraphicsroundtextitem.h" @@ -74,6 +74,10 @@ MainWindow::MainWindow(QWidget *parent) : this, SLOT(onMenuAbout()) ); + m_menuHelp->addAction( tr( "About Qt...", "Menu item \"About Qt\"" ), + this, + SLOT(onMenuQtAbout()) ); + QShapeFactory &sfactory = QShapeFactory::instance(); for( QShapeFactory::iterator i = sfactory.begin(); i != sfactory.end(); ++i ) { @@ -200,16 +204,18 @@ void MainWindow::onMenuSaveAs() cdscene->write( writer ); } + void MainWindow::onMenuAbout() { - QCDScene *cdscene = getScene( m_mdiArea ); - if( !cdscene ) - return; - - QPixmap pixmap = m_lscribe->preview( 0, cdscene, QSize( 400, 400 ) ); - - QLabel *label = new QLabel; - label->setPixmap( pixmap ); - QMdiSubWindow *subWindow = m_mdiArea->addSubWindow( label ); - subWindow->show(); + QMessageBox::about( this, + tr( "About" ), + tr( "

qlscribe - Qt lisghtScribe

" + "

revision: $Revision:$

" + "

visit project at home page " + "qlscribe.sourceforge.net

" ) ); +} + +void MainWindow::onMenuQtAbout() +{ + QMessageBox::aboutQt( this ); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 1e40287..ea672ae 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -16,7 +16,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - $Id:$ */ + $Id$ */ #ifndef MAINWINDOW_H #define MAINWINDOW_H @@ -40,6 +40,7 @@ private slots: void onMenuSaveAs(); void onMenuInsert( int id ); void onMenuAbout(); + void onMenuQtAbout(); private: QLightScribe *m_lscribe;