summaryrefslogtreecommitdiff
path: root/noncore/graphics
authormickeyl <mickeyl>2003-12-07 14:06:21 (UTC)
committer mickeyl <mickeyl>2003-12-07 14:06:21 (UTC)
commit4518f62746143246d29eb9f08030e241ac33eeb7 (patch) (unidiff)
treebeda04d2c1ddadefd4d0dc2bb18774a15da03bf2 /noncore/graphics
parentc648101ca50a9782911b58b5158b31e1d0427ab3 (diff)
downloadopie-4518f62746143246d29eb9f08030e241ac33eeb7.zip
opie-4518f62746143246d29eb9f08030e241ac33eeb7.tar.gz
opie-4518f62746143246d29eb9f08030e241ac33eeb7.tar.bz2
s/QPEToolBar/QToolBar:
- remove usage of deprecated classses - makes it easier to migrate to OToolBar in the future
Diffstat (limited to 'noncore/graphics') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index feae237..86a10a5 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -33,13 +33,13 @@
33#include <opie/colordialog.h> 33#include <opie/colordialog.h>
34#include <opie/colorpopupmenu.h> 34#include <opie/colorpopupmenu.h>
35 35
36#include <qpe/applnk.h> 36#include <qpe/applnk.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38#include <qpe/global.h> 38#include <qpe/global.h>
39#include <qpe/qpemenubar.h> 39#include <qmenubar.h>
40#include <qpe/qpetoolbar.h> 40#include <qpe/qpetoolbar.h>
41#include <qpe/resource.h> 41#include <qpe/resource.h>
42 42
43#include <qaction.h> 43#include <qaction.h>
44#include <qfile.h> 44#include <qfile.h>
45#include <qmessagebox.h> 45#include <qmessagebox.h>
@@ -61,13 +61,13 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
61 setCentralWidget(m_pDrawPadCanvas); 61 setCentralWidget(m_pDrawPadCanvas);
62 62
63 // init menu 63 // init menu
64 64
65 setToolBarsMovable(false); 65 setToolBarsMovable(false);
66 66
67 QPEToolBar* menuToolBar = new QPEToolBar(this); 67 QToolBar* menuToolBar = new QToolBar(this);
68 QMenuBar* menuBar = new QMenuBar(menuToolBar); 68 QMenuBar* menuBar = new QMenuBar(menuToolBar);
69 69
70 QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar); 70 QPopupMenu* toolsPopupMenu = new QPopupMenu(menuBar);
71 71
72 QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this); 72 QAction* deleteAllAction = new QAction(tr("Delete All"), QString::null, 0, this);
73 connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll())); 73 connect(deleteAllAction, SIGNAL(activated()), this, SLOT(deleteAll()));
@@ -100,13 +100,13 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
100 m_pAntiAliasingAction->addTo(toolsPopupMenu); 100 m_pAntiAliasingAction->addTo(toolsPopupMenu);
101 101
102 menuBar->insertItem(tr("Tools"), toolsPopupMenu); 102 menuBar->insertItem(tr("Tools"), toolsPopupMenu);
103 103
104 // init page toolbar 104 // init page toolbar
105 105
106 QPEToolBar* pageToolBar = new QPEToolBar(this); 106 QToolBar* pageToolBar = new QToolBar(this);
107 107
108 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this); 108 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this);
109 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); 109 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage()));
110 newPageAction->addTo(pageToolBar); 110 newPageAction->addTo(pageToolBar);
111 newPageAction->setWhatsThis( tr( "Click here to add a new sheet." ) ); 111 newPageAction->setWhatsThis( tr( "Click here to add a new sheet." ) );
112 112
@@ -117,18 +117,18 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
117 117
118 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this); 118 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this);
119 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); 119 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage()));
120 deletePageAction->addTo(pageToolBar); 120 deletePageAction->addTo(pageToolBar);
121 deletePageAction->setWhatsThis( tr( "Click here to remove the current sheet." ) ); 121 deletePageAction->setWhatsThis( tr( "Click here to remove the current sheet." ) );
122 122
123 QPEToolBar* emptyToolBar = new QPEToolBar(this); 123 QToolBar* emptyToolBar = new QToolBar(this);
124 emptyToolBar->setHorizontalStretchable(true); 124 emptyToolBar->setHorizontalStretchable(true);
125 125
126 // init navigation toolbar 126 // init navigation toolbar
127 127
128 QPEToolBar* navigationToolBar = new QPEToolBar(this); 128 QToolBar* navigationToolBar = new QToolBar(this);
129 129
130 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this); 130 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("undo"), QString::null, 0, this);
131 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); 131 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo()));
132 m_pUndoAction->addTo(navigationToolBar); 132 m_pUndoAction->addTo(navigationToolBar);
133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) ); 133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) );
134 134
@@ -156,13 +156,13 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
156 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); 156 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage()));
157 m_pLastPageAction->addTo(navigationToolBar); 157 m_pLastPageAction->addTo(navigationToolBar);
158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) ); 158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) );
159 159
160 // init draw mode toolbar 160 // init draw mode toolbar
161 161
162 QPEToolBar* drawModeToolBar = new QPEToolBar(this); 162 QToolBar* drawModeToolBar = new QToolBar(this);
163 163
164 m_pLineToolButton = new QToolButton(drawModeToolBar); 164 m_pLineToolButton = new QToolButton(drawModeToolBar);
165 m_pLineToolButton->setToggleButton(true); 165 m_pLineToolButton->setToggleButton(true);
166 QWhatsThis::add( m_pLineToolButton, tr( "Click here to select one of the available tools to draw lines." ) ); 166 QWhatsThis::add( m_pLineToolButton, tr( "Click here to select one of the available tools to draw lines." ) );
167 167
168 168
@@ -233,19 +233,19 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags fl )
233 233
234 m_pTool = 0; 234 m_pTool = 0;
235 setRectangleTool(); 235 setRectangleTool();
236 setEllipseTool(); 236 setEllipseTool();
237 setPointTool(); 237 setPointTool();
238 238
239 emptyToolBar = new QPEToolBar(this); 239 emptyToolBar = new QToolBar(this);
240 emptyToolBar->setHorizontalStretchable(true); 240 emptyToolBar->setHorizontalStretchable(true);
241 emptyToolBar->addSeparator(); 241 emptyToolBar->addSeparator();
242 242
243 // init draw parameters toolbar 243 // init draw parameters toolbar
244 244
245 QPEToolBar* drawParametersToolBar = new QPEToolBar(this); 245 QToolBar* drawParametersToolBar = new QToolBar(this);
246 246
247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar); 247 m_pPenWidthSpinBox = new QSpinBox(1, 9, 1, drawParametersToolBar);
248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int))); 248 connect(m_pPenWidthSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changePenWidth(int)));
249 249
250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); 250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width"));
251 m_pPenWidthSpinBox->setValue(1); 251 m_pPenWidthSpinBox->setValue(1);