author | ar <ar> | 2004-02-14 16:58:36 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-14 16:58:36 (UTC) |
commit | c6bca75c479533d064a782a5f27d3dfb3aa1c042 (patch) (side-by-side diff) | |
tree | 69abff2d3ac0a763b203f1551b33a3cc38ff0dcc | |
parent | 1ab6282d6869ca200133a0e47323ae9a760b3400 (diff) | |
download | opie-c6bca75c479533d064a782a5f27d3dfb3aa1c042.zip opie-c6bca75c479533d064a782a5f27d3dfb3aa1c042.tar.gz opie-c6bca75c479533d064a782a5f27d3dfb3aa1c042.tar.bz2 |
improve support for BigScreen
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 71c9695..139c752 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp @@ -15,52 +15,53 @@ #include "drawpadcanvas.h" #include "ellipsetool.h" #include "erasetool.h" #include "exportdialog.h" #include "filledellipsetool.h" #include "filledrectangletool.h" #include "filltool.h" #include "importdialog.h" #include "linetool.h" #include "newpagedialog.h" #include "page.h" #include "pageinformationdialog.h" #include "pointtool.h" #include "rectangletool.h" #include "texttool.h" #include "thumbnailview.h" #include <opie/colordialog.h> #include <opie/colorpopupmenu.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/global.h> -#include <qmenubar.h> #include <qpe/qpetoolbar.h> #include <qpe/resource.h> +#include <qpe/qpeapplication.h> +#include <qmenubar.h> #include <qaction.h> #include <qfile.h> #include <qmessagebox.h> #include <qspinbox.h> #include <qtoolbutton.h> #include <qtooltip.h> #include <qwhatsthis.h> DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) : QMainWindow(parent, name, WStyle_ContextHelp) { // init members m_pDrawPadCanvas = new DrawPadCanvas(this, this); connect(m_pDrawPadCanvas, SIGNAL(pagesChanged()), this, SLOT(updateView())); setCentralWidget(m_pDrawPadCanvas); // init menu setToolBarsMovable(false); QToolBar* menuToolBar = new QToolBar(this); @@ -580,77 +581,73 @@ void DrawPad::updateView() m_pPreviousPageAction->setEnabled(m_pDrawPadCanvas->goPreviousPageEnabled()); m_pNextPageAction->setEnabled(m_pDrawPadCanvas->goNextPageEnabled()); m_pLastPageAction->setEnabled(m_pDrawPadCanvas->goNextPageEnabled()); } void DrawPad::deleteAll() { QMessageBox messageBox(tr("Delete All"), tr("Do you want to delete\nall the pages?"), QMessageBox::Information, QMessageBox::Yes, QMessageBox::No | QMessageBox::Escape | QMessageBox::Default, QMessageBox::NoButton, this); messageBox.setButtonText(QMessageBox::Yes, tr("Yes")); messageBox.setButtonText(QMessageBox::No, tr("No")); if (messageBox.exec() == QMessageBox::Yes) { m_pDrawPadCanvas->deleteAll(); } } void DrawPad::importPage() { ImportDialog importDialog(this); - importDialog.showMaximized(); - - if (importDialog.exec() == QDialog::Accepted) { + if ( QPEApplication::execDialog( &importDialog ) == QDialog::Accepted ) { const DocLnk* docLnk = importDialog.selected(); if (docLnk) { m_pDrawPadCanvas->importPage(docLnk->file()); delete docLnk; } } } void DrawPad::exportPage() { ExportDialog exportDialog(m_pDrawPadCanvas->pagePosition(), m_pDrawPadCanvas->pageCount(), this); - exportDialog.showMaximized(); - - if (exportDialog.exec() == QDialog::Accepted) { + if ( QPEApplication::execDialog( &exportDialog ) == QDialog::Accepted ) { m_pDrawPadCanvas->exportPage(exportDialog.selectedFromPage(), exportDialog.selectedToPage(), exportDialog.selectedName(), exportDialog.selectedFormat()); } } void DrawPad::thumbnailView() { ThumbnailView thumbnailView(this, m_pDrawPadCanvas, this); - thumbnailView.showMaximized(); + QPEApplication::showWidget( &thumbnailView ); thumbnailView.exec(); } void DrawPad::pageInformation() { PageInformationDialog pageInformationDialog(m_pDrawPadCanvas->currentPage()); if (pageInformationDialog.exec() == QDialog::Accepted) { m_pDrawPadCanvas->currentPage()->setTitle(pageInformationDialog.selectedTitle()); } } void DrawPad::loadConfig() { Config config("drawpad"); config.setGroup("General"); m_pAntiAliasingAction->setOn(config.readBoolEntry("AntiAliasing", false)); m_pPenWidthSpinBox->setValue(config.readNumEntry("PenWidth", 1)); changePenColor(QColor(config.readEntry("PenColor", Qt::black.name()))); changeBrushColor(QColor(config.readEntry("BrushColor", Qt::white.name()))); m_pDrawPadCanvas->selectPage(config.readNumEntry("PagePosition", 1)); } |