summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp53
-rw-r--r--noncore/graphics/drawpad/pageinformationdialog.cpp10
-rw-r--r--noncore/graphics/drawpad/thumbnailview.cpp29
3 files changed, 59 insertions, 33 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index b0a414e..53db993 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -49,5 +49,6 @@
49#include <qtooltip.h> 49#include <qtooltip.h>
50#include <qwhatsthis.h>
50 51
51DrawPad::DrawPad(QWidget* parent, const char* name) 52DrawPad::DrawPad(QWidget* parent, const char* name)
52 : QMainWindow(parent, name) 53 : QMainWindow(parent, name, WStyle_ContextHelp)
53{ 54{
@@ -106,13 +107,16 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
106 107
107 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadIconSet("new"), QString::null, 0, this); 108 QAction* newPageAction = new QAction(tr("New Page"), Resource::loadPixmap("new"), QString::null, 0, this);
108 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage())); 109 connect(newPageAction, SIGNAL(activated()), this, SLOT(newPage()));
109 newPageAction->addTo(pageToolBar); 110 newPageAction->addTo(pageToolBar);
111 newPageAction->setWhatsThis( tr( "Click here to add a new sheet." ) );
110 112
111 QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadIconSet("drawpad/clear"), QString::null, 0, this); 113 QAction* clearPageAction = new QAction(tr("Clear Page"), Resource::loadPixmap("drawpad/clear"), QString::null, 0, this);
112 connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage())); 114 connect(clearPageAction, SIGNAL(activated()), this, SLOT(clearPage()));
113 clearPageAction->addTo(pageToolBar); 115 clearPageAction->addTo(pageToolBar);
116 clearPageAction->setWhatsThis( tr( "Click here to erase the current sheet." ) );
114 117
115 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadIconSet("trash"), QString::null, 0, this); 118 QAction* deletePageAction = new QAction(tr("Delete Page"), Resource::loadPixmap("trash"), QString::null, 0, this);
116 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage())); 119 connect(deletePageAction, SIGNAL(activated()), this, SLOT(deletePage()));
117 deletePageAction->addTo(pageToolBar); 120 deletePageAction->addTo(pageToolBar);
121 deletePageAction->setWhatsThis( tr( "Click here to remove the current sheet." ) );
118 122
@@ -128,2 +132,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
128 m_pUndoAction->addTo(navigationToolBar); 132 m_pUndoAction->addTo(navigationToolBar);
133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) );
129 134
@@ -132,2 +137,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
132 m_pRedoAction->addTo(navigationToolBar); 137 m_pRedoAction->addTo(navigationToolBar);
138 m_pRedoAction->setWhatsThis( tr( "Click here to re-perform the last action." ) );
133 139
@@ -136,2 +142,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
136 m_pFirstPageAction->addTo(navigationToolBar); 142 m_pFirstPageAction->addTo(navigationToolBar);
143 m_pFirstPageAction->setWhatsThis( tr( "Click here to view the first page." ) );
137 144
@@ -140,2 +147,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
140 m_pPreviousPageAction->addTo(navigationToolBar); 147 m_pPreviousPageAction->addTo(navigationToolBar);
148 m_pPreviousPageAction->setWhatsThis( tr( "Click here to view the previous page." ) );
141 149
@@ -144,2 +152,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
144 m_pNextPageAction->addTo(navigationToolBar); 152 m_pNextPageAction->addTo(navigationToolBar);
153 m_pNextPageAction->setWhatsThis( tr( "Click here to view the next page." ) );
145 154
@@ -148,2 +157,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
148 m_pLastPageAction->addTo(navigationToolBar); 157 m_pLastPageAction->addTo(navigationToolBar);
158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) );
149 159
@@ -155,2 +165,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
155 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." ) );
167
156 168
@@ -158,3 +170,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
158 170
159 m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadIconSet("drawpad/point.png"), "", 0, this); 171 m_pPointToolAction = new QAction(tr("Draw Point"), Resource::loadPixmap("drawpad/point"), "", 0, this);
160 connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool())); 172 connect(m_pPointToolAction, SIGNAL(activated()), this, SLOT(setPointTool()));
@@ -162,3 +174,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
162 174
163 m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadIconSet("drawpad/line.png"), "", 0, this); 175 m_pLineToolAction = new QAction(tr("Draw Line"), Resource::loadPixmap("drawpad/line"), "", 0, this);
164 connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool())); 176 connect(m_pLineToolAction, SIGNAL(activated()), this, SLOT(setLineTool()));
@@ -171,2 +183,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
171 m_pRectangleToolButton->setToggleButton(true); 183 m_pRectangleToolButton->setToggleButton(true);
184 QWhatsThis::add( m_pRectangleToolButton, tr( "Click here to select one of the available tools to draw rectangles." ) );
172 185
@@ -174,3 +187,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
174 187
175 m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadIconSet("drawpad/rectangle.png"), "", 0, this); 188 m_pRectangleToolAction = new QAction(tr("Draw Rectangle"), Resource::loadPixmap("drawpad/rectangle"), "", 0, this);
176 connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool())); 189 connect(m_pRectangleToolAction, SIGNAL(activated()), this, SLOT(setRectangleTool()));
@@ -178,3 +191,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
178 191
179 m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadIconSet("drawpad/filledrectangle.png"), "", 0, this); 192 m_pFilledRectangleToolAction = new QAction(tr("Draw Filled Rectangle"), Resource::loadPixmap("drawpad/filledrectangle"), "", 0, this);
180 connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool())); 193 connect(m_pFilledRectangleToolAction, SIGNAL(activated()), this, SLOT(setFilledRectangleTool()));
@@ -187,2 +200,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
187 m_pEllipseToolButton->setToggleButton(true); 200 m_pEllipseToolButton->setToggleButton(true);
201 QWhatsThis::add( m_pEllipseToolButton, tr( "Click here to select one of the available tools to draw ellipses." ) );
188 202
@@ -190,3 +204,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
190 204
191 m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadIconSet("drawpad/ellipse.png"), "", 0, this); 205 m_pEllipseToolAction = new QAction(tr("Draw Ellipse"), Resource::loadPixmap("drawpad/ellipse"), "", 0, this);
192 connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool())); 206 connect(m_pEllipseToolAction, SIGNAL(activated()), this, SLOT(setEllipseTool()));
@@ -194,3 +208,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
194 208
195 m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadIconSet("drawpad/filledellipse.png"), "", 0, this); 209 m_pFilledEllipseToolAction = new QAction(tr("Draw Filled Ellipse"), Resource::loadPixmap("drawpad/filledellipse"), "", 0, this);
196 connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool())); 210 connect(m_pFilledEllipseToolAction, SIGNAL(activated()), this, SLOT(setFilledEllipseTool()));
@@ -201,3 +215,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
201 215
202 m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadIconSet("drawpad/text.png"), QString::null, 0, this); 216 m_pTextToolAction = new QAction(tr("Insert Text"), Resource::loadPixmap("drawpad/text"), QString::null, 0, this);
203 m_pTextToolAction->setToggleAction(true); 217 m_pTextToolAction->setToggleAction(true);
@@ -205,4 +219,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
205 m_pTextToolAction->addTo(drawModeToolBar); 219 m_pTextToolAction->addTo(drawModeToolBar);
220 m_pTextToolAction->setWhatsThis( tr( "Click here to select the text drawing tool." ) );
206 221
207 m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadIconSet("drawpad/fill.png"), QString::null, 0, this); 222 m_pFillToolAction = new QAction(tr("Fill Region"), Resource::loadPixmap("drawpad/fill"), QString::null, 0, this);
208 m_pFillToolAction->setToggleAction(true); 223 m_pFillToolAction->setToggleAction(true);
@@ -210,4 +225,5 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
210 m_pFillToolAction->addTo(drawModeToolBar); 225 m_pFillToolAction->addTo(drawModeToolBar);
226 m_pFillToolAction->setWhatsThis( tr( "Click here to select the fill tool." ) );
211 227
212 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadIconSet("drawpad/erase.png"), QString::null, 0, this); 228 m_pEraseToolAction = new QAction(tr("Erase Point"), Resource::loadPixmap("drawpad/erase"), QString::null, 0, this);
213 m_pEraseToolAction->setToggleAction(true); 229 m_pEraseToolAction->setToggleAction(true);
@@ -215,2 +231,3 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
215 m_pEraseToolAction->addTo(drawModeToolBar); 231 m_pEraseToolAction->addTo(drawModeToolBar);
232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) );
216 233
@@ -235,5 +252,7 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
235 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus); 252 m_pPenWidthSpinBox->setFocusPolicy(QWidget::NoFocus);
253 QWhatsThis::add( m_pPenWidthSpinBox, tr( "Click here to select the width of the drawing pen." ) );
236 254
237 m_pPenColorToolButton = new QToolButton(drawParametersToolBar); 255 m_pPenColorToolButton = new QToolButton(drawParametersToolBar);
238 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor.png")); 256 m_pPenColorToolButton->setPixmap(Resource::loadPixmap("drawpad/pencolor"));
257 QWhatsThis::add( m_pPenColorToolButton, tr( "Click here to select the color used when drawing." ) );
239 258
@@ -249,3 +268,4 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
249 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar); 268 m_pBrushColorToolButton = new QToolButton(drawParametersToolBar);
250 m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor.png")); 269 m_pBrushColorToolButton->setPixmap(Resource::loadPixmap("drawpad/brushcolor"));
270 QWhatsThis::add( m_pBrushColorToolButton, tr( "Click here to select the color used when filling in areas." ) );
251 271
@@ -547,4 +567,3 @@ void DrawPad::updateView()
547 567
548 setCaption(tr("DrawPad") + " - " + tr("Page") + " " 568 setCaption( tr( "DrawPad - Page %1/%2" ).arg( pagePosition ).arg( pageCount ) );
549 + QString::number(pagePosition) + "/" + QString::number(pageCount));
550 569
diff --git a/noncore/graphics/drawpad/pageinformationdialog.cpp b/noncore/graphics/drawpad/pageinformationdialog.cpp
index cb14d73..d769668 100644
--- a/noncore/graphics/drawpad/pageinformationdialog.cpp
+++ b/noncore/graphics/drawpad/pageinformationdialog.cpp
@@ -96,9 +96,9 @@ QString PageInformationDialog::dateTimeString(QDateTime dateTime)
96 case 0x0001: 96 case 0x0001:
97 result += QString().sprintf("%02d", dateTime.date().day()); 97 result.append( QString().sprintf("%02d", dateTime.date().day()) );
98 break; 98 break;
99 case 0x0002: 99 case 0x0002:
100 result += QString().sprintf("%02d", dateTime.date().month()); 100 result.append( QString().sprintf("%02d", dateTime.date().month()) );
101 break; 101 break;
102 case 0x0004: 102 case 0x0004:
103 result += QString().sprintf("%04d", dateTime.date().year()); 103 result.append( QString().sprintf("%04d", dateTime.date().year()) );
104 break; 104 break;
@@ -109,3 +109,3 @@ QString PageInformationDialog::dateTimeString(QDateTime dateTime)
109 if (i < 2) { 109 if (i < 2) {
110 result += separator; 110 result.append( separator );
111 } 111 }
@@ -113,3 +113,3 @@ QString PageInformationDialog::dateTimeString(QDateTime dateTime)
113 113
114 result += QString().sprintf(" %02d:%02d", dateTime.time().hour(), dateTime.time().minute()); 114 result.append( QString().sprintf(" %02d:%02d", dateTime.time().hour(), dateTime.time().minute()) );
115 115
diff --git a/noncore/graphics/drawpad/thumbnailview.cpp b/noncore/graphics/drawpad/thumbnailview.cpp
index 9b08ca2..90ba39c 100644
--- a/noncore/graphics/drawpad/thumbnailview.cpp
+++ b/noncore/graphics/drawpad/thumbnailview.cpp
@@ -29,2 +29,3 @@
29#include <qtoolbutton.h> 29#include <qtoolbutton.h>
30#include <qwhatsthis.h>
30 31
@@ -58,6 +59,7 @@ PageListBoxItem::PageListBoxItem(Page* page, QListBox* parent)
58 59
59 m_titleText = QObject::tr("Title:") + " " + m_pPage->title(); 60 m_titleText = QObject::tr( "Title: %1" ).arg( m_pPage->title() );
60 m_dimensionText = QObject::tr("Dimension:") + " " + QString::number(m_pPage->pixmap()->width()) 61 m_dimensionText = QObject::tr( "Dimension: %1x%2" ).
61 + "x" + QString::number(m_pPage->pixmap()->height()); 62 arg( m_pPage->pixmap()->width() ).
62 m_dateText = QObject::tr("Date:") + " " + dateTimeString(m_pPage->lastModified()); 63 arg( m_pPage->pixmap()->height() );
64 m_dateText = QObject::tr( "Date: %1" ).arg( dateTimeString(m_pPage->lastModified()) );
63 65
@@ -146,9 +148,9 @@ QString PageListBoxItem::dateTimeString(QDateTime dateTime)
146 case 0x0001: 148 case 0x0001:
147 result += QString().sprintf("%02d", dateTime.date().day()); 149 result.append( QString().sprintf("%02d", dateTime.date().day()) );
148 break; 150 break;
149 case 0x0002: 151 case 0x0002:
150 result += QString().sprintf("%02d", dateTime.date().month()); 152 result.append( QString().sprintf("%02d", dateTime.date().month()) );
151 break; 153 break;
152 case 0x0004: 154 case 0x0004:
153 result += QString().sprintf("%04d", dateTime.date().year()); 155 result.append( QString().sprintf("%04d", dateTime.date().year()) );
154 break; 156 break;
@@ -159,3 +161,3 @@ QString PageListBoxItem::dateTimeString(QDateTime dateTime)
159 if (i < 2) { 161 if (i < 2) {
160 result += separator; 162 result.append( separator );
161 } 163 }
@@ -163,3 +165,3 @@ QString PageListBoxItem::dateTimeString(QDateTime dateTime)
163 165
164 result += QString().sprintf(" %02d:%02d", dateTime.time().hour(), dateTime.time().minute()); 166 result.append( QString().sprintf(" %02d:%02d", dateTime.time().hour(), dateTime.time().minute()) );
165 167
@@ -231,3 +233,3 @@ Page* PageListBox::selected() const
231ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWidget* parent, const char* name) 233ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWidget* parent, const char* name)
232 : QWidget(parent, name, Qt::WType_Modal | Qt::WType_TopLevel) 234 : QWidget(parent, name, Qt::WType_Modal | Qt::WType_TopLevel | Qt::WStyle_ContextHelp)
233{ 235{
@@ -244,2 +246,3 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
244 connect(newPageButton, SIGNAL(clicked()), this, SLOT(newPage())); 246 connect(newPageButton, SIGNAL(clicked()), this, SLOT(newPage()));
247 QWhatsThis::add( newPageButton, tr( "Click here to add a new sheet." ) );
245 248
@@ -249,2 +252,3 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
249 connect(clearPageButton, SIGNAL(clicked()), this, SLOT(clearPage())); 252 connect(clearPageButton, SIGNAL(clicked()), this, SLOT(clearPage()));
253 QWhatsThis::add( clearPageButton, tr( "Click here to erase the current sheet." ) );
250 254
@@ -254,2 +258,3 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
254 connect(deletePageButton, SIGNAL(clicked()), this, SLOT(deletePage())); 258 connect(deletePageButton, SIGNAL(clicked()), this, SLOT(deletePage()));
259 QWhatsThis::add( deletePageButton, tr( "Click here to remove the current sheet." ) );
255 260
@@ -259,3 +264,4 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
259 connect(m_pMovePageUpButton, SIGNAL(clicked()), this, SLOT(movePageUp())); 264 connect(m_pMovePageUpButton, SIGNAL(clicked()), this, SLOT(movePageUp()));
260 265 QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) );
266
261 m_pMovePageDownButton = new QToolButton(this); 267 m_pMovePageDownButton = new QToolButton(this);
@@ -264,2 +270,3 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
264 connect(m_pMovePageDownButton, SIGNAL(clicked()), this, SLOT(movePageDown())); 270 connect(m_pMovePageDownButton, SIGNAL(clicked()), this, SLOT(movePageDown()));
271 QWhatsThis::add( m_pMovePageDownButton, tr( "Click here to move the current sheet down one position in the list." ) );
265 272