summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-22 17:46:13 (UTC)
committer harlekin <harlekin>2003-03-22 17:46:13 (UTC)
commit3104d758b56032f76fa7344e66f010b85885496f (patch) (unidiff)
tree0e55db2d45754f076e76676edc6381d978e1e5a0
parent42e7ce25ed1733bd621c5e203c28d33f6dcc7e6d (diff)
downloadopie-3104d758b56032f76fa7344e66f010b85885496f.zip
opie-3104d758b56032f76fa7344e66f010b85885496f.tar.gz
opie-3104d758b56032f76fa7344e66f010b85885496f.tar.bz2
adated to new icons, adapted to the right help system and removed quit and about
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/edit-accept.xpm30
-rw-r--r--noncore/apps/opie-sheet/edit-cancel.xpm25
-rw-r--r--noncore/apps/opie-sheet/file-new.xpm24
-rw-r--r--noncore/apps/opie-sheet/file-open.xpm25
-rw-r--r--noncore/apps/opie-sheet/file-save.xpm24
-rw-r--r--noncore/apps/opie-sheet/help-general.xpm25
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp56
-rw-r--r--noncore/apps/opie-sheet/mainwindow.h1
8 files changed, 21 insertions, 189 deletions
diff --git a/noncore/apps/opie-sheet/edit-accept.xpm b/noncore/apps/opie-sheet/edit-accept.xpm
deleted file mode 100644
index 5109281..0000000
--- a/noncore/apps/opie-sheet/edit-accept.xpm
+++ b/dev/null
@@ -1,30 +0,0 @@
1/* XPM */
2static const char *edit_accept_xpm[] = {
3/* columns rows colors chars-per-pixel */
4"16 16 8 1",
5" c #000000000000",
6". c #000040400000",
7"X c #404000000000",
8"o c #000080800000",
9"O c #0000c0c00000",
10"+ c #c0c0ffffc0c0",
11"@ c #ffffffffffff",
12"# c None",
13/* pixels */
14"################",
15"################",
16"##############+#",
17"#############+O#",
18"############+Oo#",
19"###########+Oo.#",
20"##+o######+Oo. #",
21"#+OOo####+Oo.X##",
22" .oOOo##+Oo. ###",
23"# .oOOo+Oo.X####",
24"##X.oOOOo.X#####",
25"### .oOo. ######",
26"#### .o. #######",
27"##### X ########",
28"################",
29"################",
30};
diff --git a/noncore/apps/opie-sheet/edit-cancel.xpm b/noncore/apps/opie-sheet/edit-cancel.xpm
deleted file mode 100644
index 8e1606e..0000000
--- a/noncore/apps/opie-sheet/edit-cancel.xpm
+++ b/dev/null
@@ -1,25 +0,0 @@
1/* XPM */
2static const char *edit_cancel_xpm[] = {
3/* columns rows colors chars-per-pixel */
4"16 16 3 1",
5". c red",
6"X c #ffffffffffff",
7" c None",
8/* pixels */
9" ",
10" ",
11" ..... ",
12" ......... ",
13" ........... ",
14" ..XX...XX.. ",
15" ...XXX.XXX... ",
16" ....XXXXX.... ",
17" .....XXX..... ",
18" ....XXXXX.... ",
19" ...XXX.XXX... ",
20" ..XX...XX.. ",
21" ........... ",
22" ......... ",
23" ..... ",
24" ",
25};
diff --git a/noncore/apps/opie-sheet/file-new.xpm b/noncore/apps/opie-sheet/file-new.xpm
deleted file mode 100644
index ec8dd63..0000000
--- a/noncore/apps/opie-sheet/file-new.xpm
+++ b/dev/null
@@ -1,24 +0,0 @@
1/* XPM */
2static const char * file_new_xpm[] = {
3"16 16 5 1",
4 " c None",
5 ".c #808080",
6 "+c #FFFFFF",
7 "@c #C0C0C0",
8 "#c #000000",
9" .......... ",
10" .++++++++@. ",
11" .++++++++@+. ",
12" .++++++++#### ",
13" .++++++++++@# ",
14" .++++++++++@# ",
15" .++++++++++@# ",
16" .++++++++++@# ",
17" .++++++++++@# ",
18" .++++++++++@# ",
19" .++++++++++@# ",
20" .++++++++++@# ",
21" .++++++++++@# ",
22" .++++++++++@# ",
23" .@@@@@@@@@@@# ",
24" ############# "};
diff --git a/noncore/apps/opie-sheet/file-open.xpm b/noncore/apps/opie-sheet/file-open.xpm
deleted file mode 100644
index 8449d5b..0000000
--- a/noncore/apps/opie-sheet/file-open.xpm
+++ b/dev/null
@@ -1,25 +0,0 @@
1/* XPM */
2static const char * file_open_xpm[] = {
3"16 16 6 1",
4 " c None",
5 ".c #808080",
6 "+c #FFFFFF",
7 "@c #C0C0C0",
8 "#c #FFFF00",
9 "$c #000000",
10" ",
11" ..... ",
12" .+++++. ",
13" .+@#@#@+...... ",
14" .+#@#@#@+++++.$",
15" .+@#@#@#@#@#@.$",
16".............#.$",
17".++++++++++.$@.$",
18".+@#@#@#@#@#$..$",
19" .+@#@#@#@#@.$.$",
20" .+#@#@#@#@#@$.$",
21" .+#@#@#@#@#.$$",
22" ............$$",
23" $$$$$$$$$$$$$",
24" ",
25" "};
diff --git a/noncore/apps/opie-sheet/file-save.xpm b/noncore/apps/opie-sheet/file-save.xpm
deleted file mode 100644
index 039a174..0000000
--- a/noncore/apps/opie-sheet/file-save.xpm
+++ b/dev/null
@@ -1,24 +0,0 @@
1/* XPM */
2static const char * file_save_xpm[] = {
3"16 16 5 1",
4 " c None",
5 ".c #808080",
6 "+c #FFFFFF",
7 "@c #000000",
8 "#c #0000FF",
9" ",
10" ........ ",
11" .++++++.@ ",
12" .+....+.+@ #",
13" .++++++.@@@ ##",
14" .+....++++@ ##@",
15" .+++++++++@##@ ",
16" .+.......+##@ ",
17" .++++++++##@ ",
18" .+......@#@ ",
19" .++++++@@@@ ",
20" .+....@@@+@ ",
21" .++++@++++@ ",
22" .+++++++++@ ",
23" @@@@@@@@@@@ ",
24" "};
diff --git a/noncore/apps/opie-sheet/help-general.xpm b/noncore/apps/opie-sheet/help-general.xpm
deleted file mode 100644
index 9f10527..0000000
--- a/noncore/apps/opie-sheet/help-general.xpm
+++ b/dev/null
@@ -1,25 +0,0 @@
1/* XPM */
2static const char * help_general_xpm[] = {
3"16 16 6 1",
4 " c None s None",
5 ".c #000000",
6 "Xc #FF0000",
7 "oc #FFFF00",
8 "Oc #808080",
9 "+c #FFFFFF",
10" ",
11" .. ",
12" .XX. ",
13" .XXXX. ",
14" .XXXoXX. ",
15" .XXXoXoXX. ",
16" .XXXXXoXoX. ",
17" .XXXXXXXoX.O ",
18" ..XXXXXXX.+.O ",
19" .+.XXXXX.+.O ",
20" .+.XXX.+.O ",
21" .+.X.+.O ",
22" .+.+.O ",
23" .+.O ",
24" .O ",
25" "};
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index b9f8e57..43e5131 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -11,31 +11,28 @@
11 * Opie Sheet (formerly Sheet/Qt) 11 * Opie Sheet (formerly Sheet/Qt)
12 * by Serdar Ozler <sozler@sitebest.com> 12 * by Serdar Ozler <sozler@sitebest.com>
13 */ 13 */
14 14
15#include "mainwindow.h" 15#include "mainwindow.h"
16 16
17#include <qpe/filemanager.h> 17#include <qpe/filemanager.h>
18#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
19#include <qpe/resource.h>
19#include <qmessagebox.h> 20#include <qmessagebox.h>
20#include <qfile.h> 21#include <qfile.h>
22#include <qtranslator.h>
21#include <qradiobutton.h> 23#include <qradiobutton.h>
22#include "cellformat.h" 24#include "cellformat.h"
23#include "numberdlg.h" 25#include "numberdlg.h"
24#include "textdlg.h" 26#include "textdlg.h"
25#include "sortdlg.h" 27#include "sortdlg.h"
26#include "finddlg.h" 28#include "finddlg.h"
27 29
28#include "file-new.xpm" 30
29#include "file-open.xpm"
30#include "file-save.xpm"
31#include "edit-cancel.xpm"
32#include "edit-accept.xpm"
33#include "help-general.xpm"
34#include "func-plus.xpm" 31#include "func-plus.xpm"
35#include "func-minus.xpm" 32#include "func-minus.xpm"
36#include "func-cross.xpm" 33#include "func-cross.xpm"
37#include "func-divide.xpm" 34#include "func-divide.xpm"
38#include "func-paran-open.xpm" 35#include "func-paran-open.xpm"
39#include "func-paran-close.xpm" 36#include "func-paran-close.xpm"
40#include "func-comma.xpm" 37#include "func-comma.xpm"
41#include "func-func.xpm" 38#include "func-func.xpm"
@@ -260,35 +257,35 @@ void MainWindow::slotFileSave()
260 257
261void MainWindow::setDocument(const QString &applnk_filename) 258void MainWindow::setDocument(const QString &applnk_filename)
262{ 259{
263 selectorFileOpen(DocLnk(applnk_filename)); 260 selectorFileOpen(DocLnk(applnk_filename));
264} 261}
265 262
266void MainWindow::initActions() 263void MainWindow::initActions()
267{ 264{
268 fileNew=new QAction(tr("New File"), QPixmap(file_new_xpm), tr("&New"), 0, this); 265 fileNew=new QAction(tr("New File"), Resource::loadPixmap( "new" ), tr("&New"), 0, this);
269 connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew())); 266 connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew()));
270 fileOpen=new QAction(tr("Open File"), QPixmap(file_open_xpm), tr("&Open"), 0, this); 267 fileOpen=new QAction(tr("Open File"), Resource::loadPixmap( "fileopen" ), tr("&Open"), 0, this);
271 connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen())); 268 connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen()));
272 fileSave=new QAction(tr("Save File"), QPixmap(file_save_xpm), tr("&Save"), 0, this); 269 fileSave=new QAction(tr("Save File"),Resource::loadPixmap( "save" ), tr("&Save"), 0, this);
273 connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave())); 270 connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave()));
274 fileSaveAs=new QAction(tr("Save File As"), QPixmap(file_save_xpm), tr("Save &As"), 0, this); 271 fileSaveAs=new QAction(tr("Save File As"), Resource::loadPixmap( "save" ), tr("Save &As"), 0, this);
275 connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs())); 272 connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs()));
276 fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); 273 //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this);
277 connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); 274 //connect(fileQuit, SIGNAL(activated()), this, SLOT(close()));
278 275
279 helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); 276 // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this);
280 connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral())); 277 //connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral()));
281 helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this); 278 //helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this);
282 connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout())); 279 //connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout()));
283 280
284 editAccept=new QAction(tr("Accept"), QPixmap(edit_accept_xpm), tr("&Accept"), 0, this); 281 editAccept=new QAction(tr("Accept"),Resource::loadPixmap( "enter" ) , tr("&Accept"), 0, this);
285 connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); 282 connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept()));
286 editCancel=new QAction(tr("Cancel"), QPixmap(edit_cancel_xpm), tr("&Cancel"), 0, this); 283 editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this);
287 connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); 284 connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel()));
288 editCellSelect=new QAction(tr("Cell Selector"), QPixmap(cell_select_xpm), tr("Cell &Selector"), 0, this); 285 editCellSelect=new QAction(tr("Cell Selector"), QPixmap(cell_select_xpm), tr("Cell &Selector"), 0, this);
289 editCellSelect->setToggleAction(TRUE); 286 editCellSelect->setToggleAction(TRUE);
290 connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool))); 287 connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool)));
291 editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this); 288 editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this);
292 editCopy=new QAction(tr("Copy Cells"), tr("&Copy"), 0, this); 289 editCopy=new QAction(tr("Copy Cells"), tr("&Copy"), 0, this);
293 editPaste=new QAction(tr("Paste Cells"), tr("&Paste"), 0, this); 290 editPaste=new QAction(tr("Paste Cells"), tr("&Paste"), 0, this);
294 connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste())); 291 connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste()));
@@ -366,18 +363,18 @@ void MainWindow::initMenu()
366{ 363{
367 menu=new QPEMenuBar(this); 364 menu=new QPEMenuBar(this);
368 365
369 menuFile=new QPopupMenu; 366 menuFile=new QPopupMenu;
370 fileNew->addTo(menuFile); 367 fileNew->addTo(menuFile);
371 fileOpen->addTo(menuFile); 368 fileOpen->addTo(menuFile);
372 fileSave->addTo(menuFile); 369 fileSave->addTo(menuFile);
373 fileSaveAs->addTo(menuFile); 370 fileSaveAs->addTo(menuFile);
374 menuFile->insertSeparator(); 371// menuFile->insertSeparator();
375 fileQuit->addTo(menuFile); 372// fileQuit->addTo(menuFile);
376 menu->insertItem(tr("&File"), menuFile); 373 menu->insertItem(tr("&File"), menuFile);
377 374
378 menuEdit=new QPopupMenu; 375 menuEdit=new QPopupMenu;
379 editAccept->addTo(menuEdit); 376 editAccept->addTo(menuEdit);
380 editCancel->addTo(menuEdit); 377 editCancel->addTo(menuEdit);
381 editCellSelect->addTo(menuEdit); 378 editCellSelect->addTo(menuEdit);
382 menuEdit->insertSeparator(); 379 menuEdit->insertSeparator();
383 editCut->addTo(menuEdit); 380 editCut->addTo(menuEdit);
@@ -394,20 +391,20 @@ void MainWindow::initMenu()
394 formatCells->addTo(menuFormat); 391 formatCells->addTo(menuFormat);
395 menu->insertItem(tr("&Format"), menuFormat); 392 menu->insertItem(tr("&Format"), menuFormat);
396 393
397 menuData=new QPopupMenu; 394 menuData=new QPopupMenu;
398 dataSort->addTo(menuData); 395 dataSort->addTo(menuData);
399 dataFindReplace->addTo(menuData); 396 dataFindReplace->addTo(menuData);
400 menu->insertItem(tr("&Data"), menuData); 397 menu->insertItem(tr("&Data"), menuData);
401 398
402 menuHelp=new QPopupMenu; 399// menuHelp=new QPopupMenu;
403 helpGeneral->addTo(menuHelp); 400// helpGeneral->addTo(menuHelp);
404 helpAbout->addTo(menuHelp); 401// helpAbout->addTo(menuHelp);
405 menu->insertItem(tr("&Help"), menuHelp); 402// menu->insertItem(tr("&Help"), menuHelp);
406 403
407 submenuRow=new QPopupMenu; 404 submenuRow=new QPopupMenu;
408 rowHeight->addTo(submenuRow); 405 rowHeight->addTo(submenuRow);
409 rowAdjust->addTo(submenuRow); 406 rowAdjust->addTo(submenuRow);
410 rowShow->addTo(submenuRow); 407 rowShow->addTo(submenuRow);
411 rowHide->addTo(submenuRow); 408 rowHide->addTo(submenuRow);
412 menuFormat->insertItem(tr("&Row"), submenuRow); 409 menuFormat->insertItem(tr("&Row"), submenuRow);
413 410
@@ -512,27 +509,16 @@ void MainWindow::initEditToolbar()
512 509
513 editData=new QLineEdit(toolbarEdit); 510 editData=new QLineEdit(toolbarEdit);
514 toolbarEdit->setStretchableWidget(editData); 511 toolbarEdit->setStretchableWidget(editData);
515 connect(editData, SIGNAL(returnPressed()), this, SLOT(slotEditAccept())); 512 connect(editData, SIGNAL(returnPressed()), this, SLOT(slotEditAccept()));
516 513
517 editCellSelect->addTo(toolbarEdit); 514 editCellSelect->addTo(toolbarEdit);
518} 515}
519 516
520void MainWindow::slotHelpGeneral()
521{
522 if (QFile::exists(helpFile))
523 {
524 QCopEnvelope e("QPE/Application/helpbrowser", "showFile(QString)");
525 e << helpFile;
526 }
527 else
528 QMessageBox::critical(this, tr("Error"), tr("Help file not found!"));
529}
530
531void MainWindow::slotHelpAbout() 517void MainWindow::slotHelpAbout()
532{ 518{
533 QDialog dialogAbout(this, 0, TRUE); 519 QDialog dialogAbout(this, 0, TRUE);
534 dialogAbout.resize(width()-40, height()-80); 520 dialogAbout.resize(width()-40, height()-80);
535 dialogAbout.setCaption(tr("About Opie Sheet")); 521 dialogAbout.setCaption(tr("About Opie Sheet"));
536 522
537 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.2\nRelease Date: October 08, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout); 523 QLabel label(tr("Opie Sheet\nSpreadsheet Software for Opie\nQWDC Beta Winner (as Sheet/Qt)\n\nDeveloped by: Serdar Ozler\nRelease 1.0.2\nRelease Date: October 08, 2002\n\nThis product is licensed under GPL. It is freely distributable. If you want to get the latest version and also the source code, please visit the web site.\n\nhttp://qtopia.sitebest.com"), &dialogAbout);
538 label.setGeometry(dialogAbout.rect()); 524 label.setGeometry(dialogAbout.rect());
diff --git a/noncore/apps/opie-sheet/mainwindow.h b/noncore/apps/opie-sheet/mainwindow.h
index d68e25c..10d6650 100644
--- a/noncore/apps/opie-sheet/mainwindow.h
+++ b/noncore/apps/opie-sheet/mainwindow.h
@@ -83,17 +83,16 @@ class MainWindow: public QMainWindow
83 typeSheet *findSheet(const QString &name); 83 typeSheet *findSheet(const QString &name);
84 84
85 private slots: 85 private slots:
86 void slotFileNew(); 86 void slotFileNew();
87 void slotFileOpen(); 87 void slotFileOpen();
88 void slotFileSave(); 88 void slotFileSave();
89 void slotFileSaveAs(); 89 void slotFileSaveAs();
90 void slotHelpAbout(); 90 void slotHelpAbout();
91 void slotHelpGeneral();
92 void slotEditAccept(); 91 void slotEditAccept();
93 void slotEditCancel(); 92 void slotEditCancel();
94 void slotEditPaste(); 93 void slotEditPaste();
95 void slotEditPasteContents(); 94 void slotEditPasteContents();
96 void slotFormatCells(); 95 void slotFormatCells();
97 void slotInsertCells(); 96 void slotInsertCells();
98 void slotInsertRows(); 97 void slotInsertRows();
99 void slotInsertCols(); 98 void slotInsertCols();