-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 4 | ||||
-rw-r--r-- | noncore/graphics/drawpad/exportdialog.cpp | 5 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 7 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.h | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/main.cpp | 2 |
5 files changed, 13 insertions, 7 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 55b23cc..3331193 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp @@ -22,45 +22,47 @@ #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 <opie2/qcolordialog.h> #include <opie2/ocolorpopupmenu.h> #include <qpe/applnk.h> #include <qpe/config.h> -#include <qpe/qpetoolbar.h> +#include <qtoolbar.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> +using namespace Opie::Ui; +using namespace Opie::Ui; 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); diff --git a/noncore/graphics/drawpad/exportdialog.cpp b/noncore/graphics/drawpad/exportdialog.cpp index 169acef..f053bb5 100644 --- a/noncore/graphics/drawpad/exportdialog.cpp +++ b/noncore/graphics/drawpad/exportdialog.cpp @@ -13,32 +13,33 @@ #include "exportdialog.h" #include <opie2/ofileselector.h> #include <qbuttongroup.h> #include <qcombobox.h> #include <qimage.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qradiobutton.h> #include <qspinbox.h> #include <stdlib.h> +using namespace Opie::Ui; ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const char* name) : QDialog(parent, name, true) { setCaption(tr("DrawPad - Export")); m_pageAt = pageAt; m_pageCount = pageCount; QButtonGroup* selectionButtonGroup = new QButtonGroup(0, Qt::Vertical, tr("Page Selection"), this); connect(selectionButtonGroup, SIGNAL(pressed(int)), this, SLOT(selectionChanged(int))); QRadioButton* selectAllRadioButton = new QRadioButton(tr("All"), selectionButtonGroup); QRadioButton* selectCurrentRadioButton = new QRadioButton(tr("Current"), selectionButtonGroup); QRadioButton* selectRangeRadioButton = new QRadioButton(tr("Range"), selectionButtonGroup); QLabel* toLabel = new QLabel(tr("To:"), selectionButtonGroup); @@ -53,34 +54,34 @@ ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const c selectionChanged(1); m_pFromPageSpinBox->setValue(pageAt); m_pToPageSpinBox->setValue(pageAt); QGroupBox* exportGroupBox = new QGroupBox(0, Qt::Vertical, tr("Export As"), this); QLabel* nameLabel = new QLabel(tr("Name:"), exportGroupBox); QLabel* formatLabel = new QLabel(tr("Format:"), exportGroupBox); m_pNameLineEdit = new QLineEdit(exportGroupBox); m_pFormatComboBox = new QComboBox(exportGroupBox); m_pFormatComboBox->insertStrList(QImageIO::outputFormats()); MimeTypes types; types.insert( tr("All Images"), "image/*" ); - Opie::OFileSelector* fileSelector = new Opie::OFileSelector(this, Opie::OFileSelector::FileSelector, - Opie::OFileSelector::Normal, + OFileSelector* fileSelector = new OFileSelector(this, OFileSelector::FileSelector, + OFileSelector::Normal, QString::null, QString::null, types ); fileSelector->setNameVisible( false ); QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); selectionButtonGroup->layout()->setSpacing(4); exportGroupBox->layout()->setSpacing(4); QGridLayout* selectionLayout = new QGridLayout(selectionButtonGroup->layout(), 2, 2); QHBoxLayout* rangeLayout = new QHBoxLayout(); QGridLayout* exportLayout = new QGridLayout(exportGroupBox->layout(), 2, 2); selectionLayout->addWidget(selectAllRadioButton, 0, 0); selectionLayout->addWidget(selectCurrentRadioButton, 1, 0); selectionLayout->addWidget(selectRangeRadioButton, 0, 1); selectionLayout->addLayout(rangeLayout, 1, 1); diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index 4fc0a0e..a2f4c40 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp @@ -8,41 +8,42 @@ * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "importdialog.h" #include <qpe/mimetype.h> #include <qcheckbox.h> #include <qimage.h> #include <qlabel.h> #include <qlayout.h> #include <qpushbutton.h> +using namespace Opie::Ui; ImportDialog::ImportDialog(QWidget* parent, const char* name) : QDialog(parent, name, true) { setCaption(tr("DrawPad - Import")); MimeTypes types; types.insert( tr("All images"),"image/*" ); - m_pFileSelector = new Opie::OFileSelector(this, - Opie::OFileSelector::FileSelector, - Opie::OFileSelector::Normal, + m_pFileSelector = new OFileSelector(this, + OFileSelector::FileSelector, + OFileSelector::Normal, QString::null, QString::null, types ); m_pFileSelector->setNameVisible( false ); connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); m_pPreviewLabel = new QLabel(this); m_pPreviewLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken); m_pPreviewLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); m_pPreviewLabel->setFixedSize(114, 114); m_pPreviewLabel->setBackgroundMode(QWidget::PaletteMid); m_pAutomaticPreviewCheckBox = new QCheckBox(tr("Automatic preview"), this); m_pAutomaticPreviewCheckBox->setChecked(true); QPushButton* previewPushButton = new QPushButton(tr("Preview"), this); connect(previewPushButton, SIGNAL(clicked()), this, SLOT(preview())); diff --git a/noncore/graphics/drawpad/importdialog.h b/noncore/graphics/drawpad/importdialog.h index 16227d2..0e0727a 100644 --- a/noncore/graphics/drawpad/importdialog.h +++ b/noncore/graphics/drawpad/importdialog.h @@ -25,22 +25,22 @@ class QLabel; class ImportDialog : public QDialog { Q_OBJECT public: ImportDialog(QWidget* parent = 0, const char* name = 0); ~ImportDialog(); const DocLnk* selected(); private slots: void fileChanged(); void preview(); private: - Opie::OFileSelector* m_pFileSelector; + Opie::Ui::OFileSelector* m_pFileSelector; QLabel* m_pPreviewLabel; QCheckBox* m_pAutomaticPreviewCheckBox; }; #endif // IMPORTDIALOG_H diff --git a/noncore/graphics/drawpad/main.cpp b/noncore/graphics/drawpad/main.cpp index a6c666b..e48bb2e 100644 --- a/noncore/graphics/drawpad/main.cpp +++ b/noncore/graphics/drawpad/main.cpp @@ -2,17 +2,19 @@ * * * DrawPad - a drawing program for Opie Environment * * * * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * * * * This program 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 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "drawpad.h" #include <opie2/oapplicationfactory.h> +using namespace Opie::Core; +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<DrawPad> ) |