abouts added

git-svn-id: https://svn.code.sf.net/p/qlscribe/svn/trunk@7 cac9541e-1b8d-4bfa-827e-589bba606050
This commit is contained in:
ruglory
2009-01-23 23:09:12 +00:00
parent 8d299ef0ba
commit 8b09673d06
2 changed files with 19 additions and 12 deletions
+17 -11
View File
@@ -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( "<h3>qlscribe - Qt lisghtScribe</h3>"
"<p>revision: $Revision:$</p>"
"<p>visit project at home page "
"<a href=\"http://qlscribe.sourceforge.net/\">qlscribe.sourceforge.net</a></p>" ) );
}
void MainWindow::onMenuQtAbout()
{
QMessageBox::aboutQt( this );
}