author | drw <drw> | 2004-03-02 21:03:59 (UTC) |
---|---|---|
committer | drw <drw> | 2004-03-02 21:03:59 (UTC) |
commit | 0a67659dce57ac1475841838369e924f2441e991 (patch) (side-by-side diff) | |
tree | 394d6b89ba3262033e481020953196123399492a | |
parent | 9631067183b4cafa2ea07d2202bf88f4d42c35e2 (diff) | |
download | opie-0a67659dce57ac1475841838369e924f2441e991.zip opie-0a67659dce57ac1475841838369e924f2441e991.tar.gz opie-0a67659dce57ac1475841838369e924f2441e991.tar.bz2 |
DrawPad: libopie -> libopie2
-rw-r--r-- | noncore/graphics/drawpad/config.in | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.cpp | 10 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.h | 1 | ||||
-rw-r--r-- | noncore/graphics/drawpad/drawpad.pro | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/exportdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 8 | ||||
-rw-r--r-- | noncore/graphics/drawpad/importdialog.h | 5 | ||||
-rw-r--r-- | noncore/graphics/drawpad/main.cpp | 2 | ||||
-rw-r--r-- | noncore/graphics/drawpad/opie-drawpad.control | 2 |
9 files changed, 19 insertions, 19 deletions
diff --git a/noncore/graphics/drawpad/config.in b/noncore/graphics/drawpad/config.in index 290a642..3ed03a4 100644 --- a/noncore/graphics/drawpad/config.in +++ b/noncore/graphics/drawpad/config.in @@ -1,4 +1,4 @@ config DRAWPAD boolean "opie-drawpad (take simple notes or draw images)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBQTAUX diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp index 9f0e27f..55b23cc 100644 --- a/noncore/graphics/drawpad/drawpad.cpp +++ b/noncore/graphics/drawpad/drawpad.cpp @@ -9,67 +9,67 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "drawpad.h" #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 <opie2/qcolordialog.h> +#include <opie2/ocolorpopupmenu.h> #include <qpe/applnk.h> #include <qpe/config.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 ) +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); QMenuBar* menuBar = new QMenuBar(menuToolBar); QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar); QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this); connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll())); deleteAllAction->addTo(toolsPopupMenu); toolsPopupMenu->insertSeparator(); @@ -234,62 +234,62 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl ) setRectangleTool(); setEllipseTool(); setPointTool(); emptyToolBar = new QToolBar(this); emptyToolBar->setHorizontalStretchable(true); emptyToolBar->addSeparator(); // init draw parameters toolbar QToolBar* drawParametersToolBar = new QToolBar(this); m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); m_pPenWidthSpinBox->setValue(1); m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) ); m_pPenColorToolButton = new QToolButton(drawParametersToolBar); m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor")); QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) ); - OColorPopupMenu* penColorPopupMenu = new OColorPopupMenu(Qt::black, m_pPenColorToolButton); + Opie::OColorPopupMenu* penColorPopupMenu = new Opie::OColorPopupMenu(Qt::black, m_pPenColorToolButton); connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); QToolTip::add(m_pPenColorToolButton, tr("Pen Color")); m_pPenColorToolButton->setPopup(penColorPopupMenu); m_pPenColorToolButton->setPopupDelay(0); changePenColor(Qt::black); m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor")); QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) ); - OColorPopupMenu* brushColorPopupMenu = new OColorPopupMenu(Qt::white, m_pBrushColorToolButton); + Opie::OColorPopupMenu* brushColorPopupMenu = new Opie::OColorPopupMenu(Qt::white, m_pBrushColorToolButton); connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); QToolTip::add(m_pBrushColorToolButton, tr("Fill Color")); m_pBrushColorToolButton->setPopup(brushColorPopupMenu); m_pBrushColorToolButton->setPopupDelay(0); changeBrushColor(Qt::white); finishStartup(); } void DrawPad::finishStartup() { // init pages QFile file(Global::applicationFileName("drawpad", "drawpad.xml")); if (file.open(IO_ReadOnly)) { m_pDrawPadCanvas->load(&file); file.close(); } else { m_pDrawPadCanvas->initialPage(); } diff --git a/noncore/graphics/drawpad/drawpad.h b/noncore/graphics/drawpad/drawpad.h index 48d5225..8ba6e58 100644 --- a/noncore/graphics/drawpad/drawpad.h +++ b/noncore/graphics/drawpad/drawpad.h @@ -1,42 +1,41 @@ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef DRAWPAD_H #define DRAWPAD_H #include <qmainwindow.h> - #include <qpen.h> class DrawPadCanvas; class Tool; class QAction; class QColor; class QSpinBox; class QToolButton; class QWidgetStack; class DrawPad : public QMainWindow { Q_OBJECT public: DrawPad(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); ~DrawPad(); static QString appName() { return QString::fromLatin1("drawpad"); } Tool* tool() { return m_pTool; } QPen pen() { return m_pen; } QBrush brush() { return m_brush; } diff --git a/noncore/graphics/drawpad/drawpad.pro b/noncore/graphics/drawpad/drawpad.pro index 30b2199..5e6ca6b 100644 --- a/noncore/graphics/drawpad/drawpad.pro +++ b/noncore/graphics/drawpad/drawpad.pro @@ -19,29 +19,29 @@ HEADERS = drawpad.h \ thumbnailview.h \ tool.h SOURCES = drawpad.cpp \ drawpadcanvas.cpp \ ellipsetool.cpp \ erasetool.cpp \ exportdialog.cpp \ filltool.cpp \ filledellipsetool.cpp \ filledrectangletool.cpp \ importdialog.cpp \ linetool.cpp \ main.cpp \ newpagedialog.cpp \ page.cpp \ pageinformationdialog.cpp \ pointtool.cpp \ rectangletool.cpp \ shapetool.cpp \ texttool.cpp \ thumbnailview.cpp \ tool.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopie +LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 TARGET = drawpad include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/graphics/drawpad/exportdialog.cpp b/noncore/graphics/drawpad/exportdialog.cpp index d63f428..169acef 100644 --- a/noncore/graphics/drawpad/exportdialog.cpp +++ b/noncore/graphics/drawpad/exportdialog.cpp @@ -1,40 +1,40 @@ /*************************************************************************** * * * 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 "exportdialog.h" -#include <opie/ofileselector.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> 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); @@ -45,50 +45,50 @@ ExportDialog::ExportDialog(uint pageAt, uint pageCount, QWidget* parent, const c m_pFromPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); connect(m_pFromPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(fromPageChanged(int))); m_pToPageSpinBox = new QSpinBox(1, m_pageCount, 1, selectionButtonGroup); connect(m_pToPageSpinBox, SIGNAL(valueChanged(int)), this, SLOT(toPageChanged(int))); selectionButtonGroup->setButton(1); 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/*" ); - OFileSelector* fileSelector = new OFileSelector(this, OFileSelector::FileSelector, - OFileSelector::Normal, + Opie::OFileSelector* fileSelector = new Opie::OFileSelector(this, Opie::OFileSelector::FileSelector, + Opie::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); rangeLayout->addWidget(m_pFromPageSpinBox); rangeLayout->addWidget(toLabel); rangeLayout->addWidget(m_pToPageSpinBox); exportLayout->addWidget(nameLabel, 0, 0); exportLayout->addWidget(formatLabel, 1, 0); exportLayout->addWidget(m_pNameLineEdit, 0, 1); diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index ce2e7ee..4fc0a0e 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp @@ -1,56 +1,56 @@ /*************************************************************************** * * * 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 "importdialog.h" -#include <opie/ofileselector.h> +#include <qpe/mimetype.h> #include <qcheckbox.h> #include <qimage.h> #include <qlabel.h> #include <qlayout.h> #include <qpushbutton.h> 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 OFileSelector(this, - OFileSelector::FileSelector, - OFileSelector::Normal, + m_pFileSelector = new Opie::OFileSelector(this, + Opie::OFileSelector::FileSelector, + Opie::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())); QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); QHBoxLayout* previewLayout = new QHBoxLayout(4); QVBoxLayout* previewSecondLayout = new QVBoxLayout(4); previewSecondLayout->addWidget(m_pAutomaticPreviewCheckBox); previewSecondLayout->addWidget(previewPushButton); previewSecondLayout->addStretch(); diff --git a/noncore/graphics/drawpad/importdialog.h b/noncore/graphics/drawpad/importdialog.h index ed655a5..16227d2 100644 --- a/noncore/graphics/drawpad/importdialog.h +++ b/noncore/graphics/drawpad/importdialog.h @@ -1,45 +1,46 @@ /*************************************************************************** * * * 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. * * * ***************************************************************************/ #ifndef IMPORTDIALOG_H #define IMPORTDIALOG_H +#include <opie2/ofileselector.h> + #include <qdialog.h> class DocLnk; -class OFileSelector; class QCheckBox; 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: - OFileSelector* m_pFileSelector; + Opie::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 c87cc0f..a6c666b 100644 --- a/noncore/graphics/drawpad/main.cpp +++ b/noncore/graphics/drawpad/main.cpp @@ -1,18 +1,18 @@ /*************************************************************************** * * * 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 <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> OPIE_EXPORT_APP( OApplicationFactory<DrawPad> ) diff --git a/noncore/graphics/drawpad/opie-drawpad.control b/noncore/graphics/drawpad/opie-drawpad.control index f0aa0b4..2a403f9 100644 --- a/noncore/graphics/drawpad/opie-drawpad.control +++ b/noncore/graphics/drawpad/opie-drawpad.control @@ -1,12 +1,12 @@ Package: opie-drawpad Files: plugins/application/libdrawpad.so* bin/drawpad apps/1Pim/drawpad.desktop pics/drawpad Priority: optional Section: opie/pim Maintainer: Sébastien Prud'homme <prudhomme@laposte.net> Architecture: arm -Depends: task-opie-minimal, libopie1 +Depends: task-opie-minimal, libopiecore2, libopieui2, libqtaux2 Description: A note taking program with basic draw tools DrawPad is an easy note taking program for Zaurus. It can also be used to draw simple images. DrawPad was developed for the Opie project, an alternative to the standard Zaurus environment. Version: $QPE_VERSION$EXTRAVERSION |