summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show 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.cpp27
3 files changed, 58 insertions, 32 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
@@ -47,9 +47,10 @@
47#include <qspinbox.h> 47#include <qspinbox.h>
48#include <qtoolbutton.h> 48#include <qtoolbutton.h>
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{
54 // init members 55 // init members
55 56
@@ -104,17 +105,20 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
104 105
105 QPEToolBar* pageToolBar = new QPEToolBar(this); 106 QPEToolBar* pageToolBar = new QPEToolBar(this);
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
119 QPEToolBar* emptyToolBar = new QPEToolBar(this); 123 QPEToolBar* emptyToolBar = new QPEToolBar(this);
120 emptyToolBar->setHorizontalStretchable(true); 124 emptyToolBar->setHorizontalStretchable(true);
@@ -126,26 +130,32 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
126 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("drawpad/undo"), QString::null, 0, this); 130 m_pUndoAction = new QAction(tr("Undo"), Resource::loadIconSet("drawpad/undo"), QString::null, 0, this);
127 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo())); 131 connect(m_pUndoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(undo()));
128 m_pUndoAction->addTo(navigationToolBar); 132 m_pUndoAction->addTo(navigationToolBar);
133 m_pUndoAction->setWhatsThis( tr( "Click here to undo the last action." ) );
129 134
130 m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("drawpad/redo"), QString::null, 0, this); 135 m_pRedoAction = new QAction(tr("Redo"), Resource::loadIconSet("drawpad/redo"), QString::null, 0, this);
131 connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo())); 136 connect(m_pRedoAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(redo()));
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
134 m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this); 140 m_pFirstPageAction = new QAction(tr("First Page"), Resource::loadIconSet("fastback"), QString::null, 0, this);
135 connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage())); 141 connect(m_pFirstPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goFirstPage()));
136 m_pFirstPageAction->addTo(navigationToolBar); 142 m_pFirstPageAction->addTo(navigationToolBar);
143 m_pFirstPageAction->setWhatsThis( tr( "Click here to view the first page." ) );
137 144
138 m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this); 145 m_pPreviousPageAction = new QAction(tr("Previous Page"), Resource::loadIconSet("back"), QString::null, 0, this);
139 connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage())); 146 connect(m_pPreviousPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goPreviousPage()));
140 m_pPreviousPageAction->addTo(navigationToolBar); 147 m_pPreviousPageAction->addTo(navigationToolBar);
148 m_pPreviousPageAction->setWhatsThis( tr( "Click here to view the previous page." ) );
141 149
142 m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this); 150 m_pNextPageAction = new QAction(tr("Next Page"), Resource::loadIconSet("forward"), QString::null, 0, this);
143 connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage())); 151 connect(m_pNextPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goNextPage()));
144 m_pNextPageAction->addTo(navigationToolBar); 152 m_pNextPageAction->addTo(navigationToolBar);
153 m_pNextPageAction->setWhatsThis( tr( "Click here to view the next page." ) );
145 154
146 m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this); 155 m_pLastPageAction = new QAction(tr("Last Page"), Resource::loadIconSet("fastforward"), QString::null, 0, this);
147 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage())); 156 connect(m_pLastPageAction, SIGNAL(activated()), m_pDrawPadCanvas, SLOT(goLastPage()));
148 m_pLastPageAction->addTo(navigationToolBar); 157 m_pLastPageAction->addTo(navigationToolBar);
158 m_pLastPageAction->setWhatsThis( tr( "Click here to view the last page." ) );
149 159
150 // init draw mode toolbar 160 // init draw mode toolbar
151 161
@@ -153,14 +163,16 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
153 163
154 m_pLineToolButton = new QToolButton(drawModeToolBar); 164 m_pLineToolButton = new QToolButton(drawModeToolBar);
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
157 QPopupMenu* linePopupMenu = new QPopupMenu(m_pLineToolButton); 169 QPopupMenu* linePopupMenu = new QPopupMenu(m_pLineToolButton);
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()));
161 m_pPointToolAction->addTo(linePopupMenu); 173 m_pPointToolAction->addTo(linePopupMenu);
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()));
165 m_pLineToolAction->addTo(linePopupMenu); 177 m_pLineToolAction->addTo(linePopupMenu);
166 178
@@ -169,14 +181,15 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
169 181
170 m_pRectangleToolButton = new QToolButton(drawModeToolBar); 182 m_pRectangleToolButton = new QToolButton(drawModeToolBar);
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
173 QPopupMenu* rectanglePopupMenu = new QPopupMenu(m_pRectangleToolButton); 186 QPopupMenu* rectanglePopupMenu = new QPopupMenu(m_pRectangleToolButton);
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()));
177 m_pRectangleToolAction->addTo(rectanglePopupMenu); 190 m_pRectangleToolAction->addTo(rectanglePopupMenu);
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()));
181 m_pFilledRectangleToolAction->addTo(rectanglePopupMenu); 194 m_pFilledRectangleToolAction->addTo(rectanglePopupMenu);
182 195
@@ -185,34 +198,38 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
185 198
186 m_pEllipseToolButton = new QToolButton(drawModeToolBar); 199 m_pEllipseToolButton = new QToolButton(drawModeToolBar);
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
189 QPopupMenu* ellipsePopupMenu = new QPopupMenu(m_pEllipseToolButton); 203 QPopupMenu* ellipsePopupMenu = new QPopupMenu(m_pEllipseToolButton);
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()));
193 m_pEllipseToolAction->addTo(ellipsePopupMenu); 207 m_pEllipseToolAction->addTo(ellipsePopupMenu);
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()));
197 m_pFilledEllipseToolAction->addTo(ellipsePopupMenu); 211 m_pFilledEllipseToolAction->addTo(ellipsePopupMenu);
198 212
199 m_pEllipseToolButton->setPopup(ellipsePopupMenu); 213 m_pEllipseToolButton->setPopup(ellipsePopupMenu);
200 m_pEllipseToolButton->setPopupDelay(0); 214 m_pEllipseToolButton->setPopupDelay(0);
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);
204 connect(m_pTextToolAction, SIGNAL(activated()), this, SLOT(setTextTool())); 218 connect(m_pTextToolAction, SIGNAL(activated()), this, SLOT(setTextTool()));
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);
209 connect(m_pFillToolAction, SIGNAL(activated()), this, SLOT(setFillTool())); 224 connect(m_pFillToolAction, SIGNAL(activated()), this, SLOT(setFillTool()));
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);
214 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool())); 230 connect(m_pEraseToolAction, SIGNAL(activated()), this, SLOT(setEraseTool()));
215 m_pEraseToolAction->addTo(drawModeToolBar); 231 m_pEraseToolAction->addTo(drawModeToolBar);
232 m_pEraseToolAction->setWhatsThis( tr( "Click here to select the eraser tool." ) );
216 233
217 m_pTool = 0; 234 m_pTool = 0;
218 setRectangleTool(); 235 setRectangleTool();
@@ -233,9 +250,11 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
233 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width")); 250 QToolTip::add(m_pPenWidthSpinBox, tr("Pen Width"));
234 m_pPenWidthSpinBox->setValue(1); 251 m_pPenWidthSpinBox->setValue(1);
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
240 ColorPopupMenu* penColorPopupMenu = new ColorPopupMenu(Qt::black, m_pPenColorToolButton); 259 ColorPopupMenu* penColorPopupMenu = new ColorPopupMenu(Qt::black, m_pPenColorToolButton);
241 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&))); 260 connect(penColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changePenColor(const QColor&)));
@@ -247,7 +266,8 @@ DrawPad::DrawPad(QWidget* parent, const char* name)
247 changePenColor(Qt::black); 266 changePenColor(Qt::black);
248 267
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
252 ColorPopupMenu* brushColorPopupMenu = new ColorPopupMenu(Qt::white, m_pBrushColorToolButton); 272 ColorPopupMenu* brushColorPopupMenu = new ColorPopupMenu(Qt::white, m_pBrushColorToolButton);
253 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&))); 273 connect(brushColorPopupMenu, SIGNAL(colorSelected(const QColor&)), this, SLOT(changeBrushColor(const QColor&)));
@@ -545,8 +565,7 @@ void DrawPad::updateView()
545 uint pagePosition = m_pDrawPadCanvas->pagePosition(); 565 uint pagePosition = m_pDrawPadCanvas->pagePosition();
546 uint pageCount = m_pDrawPadCanvas->pageCount(); 566 uint pageCount = m_pDrawPadCanvas->pageCount();
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
551 m_pUndoAction->setEnabled(m_pDrawPadCanvas->currentPage()->undoEnabled()); 570 m_pUndoAction->setEnabled(m_pDrawPadCanvas->currentPage()->undoEnabled());
552 m_pRedoAction->setEnabled(m_pDrawPadCanvas->currentPage()->redoEnabled()); 571 m_pRedoAction->setEnabled(m_pDrawPadCanvas->currentPage()->redoEnabled());
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
@@ -94,24 +94,24 @@ QString PageInformationDialog::dateTimeString(QDateTime dateTime)
94 for (int i = 0; i < 3; i++) { 94 for (int i = 0; i < 3; i++) {
95 switch((shortOrder >> (i * 3)) & 0x0007) { 95 switch((shortOrder >> (i * 3)) & 0x0007) {
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;
105 default: 105 default:
106 break; 106 break;
107 } 107 }
108 108
109 if (i < 2) { 109 if (i < 2) {
110 result += separator; 110 result.append( separator );
111 } 111 }
112 } 112 }
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
116 return result; 116 return result;
117} 117}
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
@@ -27,6 +27,7 @@
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qmessagebox.h> 28#include <qmessagebox.h>
29#include <qtoolbutton.h> 29#include <qtoolbutton.h>
30#include <qwhatsthis.h>
30 31
31#define THUMBNAIL_SIZE 48 32#define THUMBNAIL_SIZE 48
32 33
@@ -56,10 +57,11 @@ PageListBoxItem::PageListBoxItem(Page* page, QListBox* parent)
56 57
57 m_thumbnail.convertFromImage(thumbnailImage); 58 m_thumbnail.convertFromImage(thumbnailImage);
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
64 QColor baseColor = parent->colorGroup().base(); 66 QColor baseColor = parent->colorGroup().base();
65 int h, s, v; 67 int h, s, v;
@@ -144,24 +146,24 @@ QString PageListBoxItem::dateTimeString(QDateTime dateTime)
144 for (int i = 0; i < 3; i++) { 146 for (int i = 0; i < 3; i++) {
145 switch((shortOrder >> (i * 3)) & 0x0007) { 147 switch((shortOrder >> (i * 3)) & 0x0007) {
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;
155 default: 157 default:
156 break; 158 break;
157 } 159 }
158 160
159 if (i < 2) { 161 if (i < 2) {
160 result += separator; 162 result.append( separator );
161 } 163 }
162 } 164 }
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
166 return result; 168 return result;
167} 169}
@@ -229,7 +231,7 @@ Page* PageListBox::selected() const
229} 231}
230 232
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{
234 inLoop = false; 236 inLoop = false;
235 237
@@ -242,26 +244,31 @@ ThumbnailView::ThumbnailView(DrawPad* drawPad, DrawPadCanvas* drawPadCanvas, QWi
242 newPageButton->setIconSet(Resource::loadIconSet("new")); 244 newPageButton->setIconSet(Resource::loadIconSet("new"));
243 newPageButton->setAutoRaise(true); 245 newPageButton->setAutoRaise(true);
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
246 QToolButton* clearPageButton = new QToolButton(this); 249 QToolButton* clearPageButton = new QToolButton(this);
247 clearPageButton->setIconSet(Resource::loadIconSet("drawpad/clear")); 250 clearPageButton->setIconSet(Resource::loadIconSet("drawpad/clear"));
248 clearPageButton->setAutoRaise(true); 251 clearPageButton->setAutoRaise(true);
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
251 QToolButton* deletePageButton = new QToolButton(this); 255 QToolButton* deletePageButton = new QToolButton(this);
252 deletePageButton->setIconSet(Resource::loadIconSet("trash")); 256 deletePageButton->setIconSet(Resource::loadIconSet("trash"));
253 deletePageButton->setAutoRaise(true); 257 deletePageButton->setAutoRaise(true);
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
256 m_pMovePageUpButton = new QToolButton(this); 261 m_pMovePageUpButton = new QToolButton(this);
257 m_pMovePageUpButton->setIconSet(Resource::loadIconSet("up")); 262 m_pMovePageUpButton->setIconSet(Resource::loadIconSet("up"));
258 m_pMovePageUpButton->setAutoRaise(true); 263 m_pMovePageUpButton->setAutoRaise(true);
259 connect(m_pMovePageUpButton, SIGNAL(clicked()), this, SLOT(movePageUp())); 264 connect(m_pMovePageUpButton, SIGNAL(clicked()), this, SLOT(movePageUp()));
265 QWhatsThis::add( m_pMovePageUpButton, tr( "Click here to move the current sheet up one position in the list." ) );
260 266
261 m_pMovePageDownButton = new QToolButton(this); 267 m_pMovePageDownButton = new QToolButton(this);
262 m_pMovePageDownButton->setIconSet(Resource::loadIconSet("down")); 268 m_pMovePageDownButton->setIconSet(Resource::loadIconSet("down"));
263 m_pMovePageDownButton->setAutoRaise(true); 269 m_pMovePageDownButton->setAutoRaise(true);
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
266 m_pPageListBox = new PageListBox(m_pDrawPadCanvas, this); 273 m_pPageListBox = new PageListBox(m_pDrawPadCanvas, this);
267 connect(m_pPageListBox, SIGNAL(selectionChanged()), this, SLOT(changePage())); 274 connect(m_pPageListBox, SIGNAL(selectionChanged()), this, SLOT(changePage()));