summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-sheet/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp35
1 files changed, 11 insertions, 24 deletions
diff --git a/noncore/apps/opie-sheet/mainwindow.cpp b/noncore/apps/opie-sheet/mainwindow.cpp
index a725e31..d47a570 100644
--- a/noncore/apps/opie-sheet/mainwindow.cpp
+++ b/noncore/apps/opie-sheet/mainwindow.cpp
@@ -27,19 +27,6 @@
27#include "sortdlg.h" 27#include "sortdlg.h"
28#include "finddlg.h" 28#include "finddlg.h"
29 29
30
31#include "func-plus.xpm"
32#include "func-minus.xpm"
33#include "func-cross.xpm"
34#include "func-divide.xpm"
35#include "func-paran-open.xpm"
36#include "func-paran-close.xpm"
37#include "func-comma.xpm"
38#include "func-func.xpm"
39#include "func-equal.xpm"
40#include "cell-select.xpm"
41#include "excel16.xpm"
42
43#define DEFAULT_NUM_ROWS 300 30#define DEFAULT_NUM_ROWS 300
44#define DEFAULT_NUM_COLS (26*3) 31#define DEFAULT_NUM_COLS (26*3)
45#define DEFAULT_NUM_SHEETS 3 32#define DEFAULT_NUM_SHEETS 3
@@ -293,7 +280,7 @@ void MainWindow::initActions()
293 280
294 //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this); 281 //fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this);
295 //connect(fileQuit, SIGNAL(activated()), this, SLOT(close())); 282 //connect(fileQuit, SIGNAL(activated()), this, SLOT(close()));
296 fileExcelImport=new QAction(tr("Import Excel file"),QPixmap(excel16_xpm),tr("Import E&xcel file"),0,this); 283 fileExcelImport=new QAction(tr("Import Excel file"),Resource::loadPixmap( "/opie-sheet/excel16" ),tr("Import E&xcel file"),0,this);
297 connect(fileExcelImport, SIGNAL(activated()), this, SLOT(slotImportExcelOpen())); 284 connect(fileExcelImport, SIGNAL(activated()), this, SLOT(slotImportExcelOpen()));
298 285
299 // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this); 286 // helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this);
@@ -305,7 +292,7 @@ void MainWindow::initActions()
305 connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept())); 292 connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept()));
306 editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this); 293 editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this);
307 connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel())); 294 connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel()));
308 editCellSelect=new QAction(tr("Cell Selector"), QPixmap(cell_select_xpm), tr("Cell &Selector"), 0, this); 295 editCellSelect=new QAction(tr("Cell Selector"), Resource::loadPixmap( "opie-sheet/cell_select" ), tr("Cell &Selector"), 0, this);
309 editCellSelect->setToggleAction(TRUE); 296 editCellSelect->setToggleAction(TRUE);
310 connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool))); 297 connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool)));
311 editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this); 298 editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this);
@@ -356,28 +343,28 @@ void MainWindow::initActions()
356 dataFindReplace=new QAction(tr("Find && Replace"), tr("&Find && Replace"), 0, this); 343 dataFindReplace=new QAction(tr("Find && Replace"), tr("&Find && Replace"), 0, this);
357 connect(dataFindReplace, SIGNAL(activated()), this, SLOT(slotDataFindReplace())); 344 connect(dataFindReplace, SIGNAL(activated()), this, SLOT(slotDataFindReplace()));
358 345
359 funcEqual=new QAction(tr("Equal To"), QPixmap(func_equal_xpm), tr("&Equal To"), 0, this); 346 funcEqual=new QAction(tr("Equal To"), Resource::loadPixmap( "opie-sheet/func_equal" ), tr("&Equal To"), 0, this);
360 funcEqual->setToolTip("="); 347 funcEqual->setToolTip("=");
361 connect(funcEqual, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 348 connect(funcEqual, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
362 funcPlus=new QAction(tr("Addition"), QPixmap(func_plus_xpm), tr("&Addition"), 0, this); 349 funcPlus=new QAction(tr("Addition"), Resource::loadPixmap( "opie-sheet/func_plus" ), tr("&Addition"), 0, this);
363 funcPlus->setToolTip("+"); 350 funcPlus->setToolTip("+");
364 connect(funcPlus, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 351 connect(funcPlus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
365 funcMinus=new QAction(tr("Subtraction"), QPixmap(func_minus_xpm), tr("&Subtraction"), 0, this); 352 funcMinus=new QAction(tr("Subtraction"), Resource::loadPixmap( "opie-sheet/func_minus" ), tr("&Subtraction"), 0, this);
366 funcMinus->setToolTip("-"); 353 funcMinus->setToolTip("-");
367 connect(funcMinus, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 354 connect(funcMinus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
368 funcCross=new QAction(tr("Multiplication"), QPixmap(func_cross_xpm), tr("&Multiplication"), 0, this); 355 funcCross=new QAction(tr("Multiplication"), Resource::loadPixmap ("opie-sheet/func_cross" ), tr("&Multiplication"), 0, this);
369 funcCross->setToolTip("*"); 356 funcCross->setToolTip("*");
370 connect(funcCross, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 357 connect(funcCross, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
371 funcDivide=new QAction(tr("Division"), QPixmap(func_divide_xpm), tr("&Division"), 0, this); 358 funcDivide=new QAction(tr("Division"), Resource::loadPixmap( "opie-sheet/func_divide" ), tr("&Division"), 0, this);
372 funcDivide->setToolTip("/"); 359 funcDivide->setToolTip("/");
373 connect(funcDivide, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 360 connect(funcDivide, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
374 funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), QPixmap(func_paran_open_xpm), tr("&Open Paranthesis"), 0, this); 361 funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), Resource::loadPixmap( "opie-sheet/func_paran_open" ), tr("&Open Paranthesis"), 0, this);
375 funcParanOpen->setToolTip("("); 362 funcParanOpen->setToolTip("(");
376 connect(funcParanOpen, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 363 connect(funcParanOpen, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
377 funcParanClose=new QAction(tr("Close Paranthesis"), QPixmap(func_paran_close_xpm), tr("&Close Paranthesis"), 0, this); 364 funcParanClose=new QAction(tr("Close Paranthesis"), Resource::loadPixmap( "opie-sheet/func_paran_close" ), tr("&Close Paranthesis"), 0, this);
378 funcParanClose->setToolTip(")"); 365 funcParanClose->setToolTip(")");
379 connect(funcParanClose, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 366 connect(funcParanClose, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
380 funcComma=new QAction(tr("Comma"), QPixmap(func_comma_xpm), tr("&Comma"), 0, this); 367 funcComma=new QAction(tr("Comma"), Resource::loadPixmap( "opie-sheet/func_comma" ), tr("&Comma"), 0, this);
381 funcComma->setToolTip(","); 368 funcComma->setToolTip(",");
382 connect(funcComma, SIGNAL(activated()), this, SLOT(slotFuncOutput())); 369 connect(funcComma, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
383} 370}
@@ -613,7 +600,7 @@ void MainWindow::initFunctionsToolbar()
613 funcComma->addTo(toolbarFunctions); 600 funcComma->addTo(toolbarFunctions);
614 601
615 toolFunction=new QToolButton(toolbarFunctions); 602 toolFunction=new QToolButton(toolbarFunctions);
616 toolFunction->setPixmap(func_func_xpm); 603 toolFunction->setPixmap(Resource::loadPixmap( "opie-sheet/func_func" ));
617 toolFunction->setTextLabel(tr("Functions")); 604 toolFunction->setTextLabel(tr("Functions"));
618 toolFunction->setPopup(submenuFunc); 605 toolFunction->setPopup(submenuFunc);
619 toolFunction->setPopupDelay(0); 606 toolFunction->setPopupDelay(0);