summaryrefslogtreecommitdiff
authorhayzel <hayzel>2004-01-08 18:37:03 (UTC)
committer hayzel <hayzel>2004-01-08 18:37:03 (UTC)
commit44443aec5d4b8f974b30b1e9b4ea920d6582add1 (patch) (side-by-side diff)
treec8abd765a49f7679f13cf1417b29aa04ef92866f
parentbb961821c44ea2447288ce74537439eb8f97ed9a (diff)
downloadopie-44443aec5d4b8f974b30b1e9b4ea920d6582add1.zip
opie-44443aec5d4b8f974b30b1e9b4ea920d6582add1.tar.gz
opie-44443aec5d4b8f974b30b1e9b4ea920d6582add1.tar.bz2
modified mainwindow.cpp to use icons from resource folder pics
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/cell-select.xpm25
-rw-r--r--noncore/apps/opie-sheet/excel16.xpm187
-rw-r--r--noncore/apps/opie-sheet/func-comma.xpm24
-rw-r--r--noncore/apps/opie-sheet/func-cross.xpm23
-rw-r--r--noncore/apps/opie-sheet/func-divide.xpm23
-rw-r--r--noncore/apps/opie-sheet/func-equal.xpm23
-rw-r--r--noncore/apps/opie-sheet/func-func.xpm23
-rw-r--r--noncore/apps/opie-sheet/func-minus.xpm23
-rw-r--r--noncore/apps/opie-sheet/func-paran-close.xpm24
-rw-r--r--noncore/apps/opie-sheet/func-paran-open.xpm24
-rw-r--r--noncore/apps/opie-sheet/func-plus.xpm23
-rw-r--r--noncore/apps/opie-sheet/mainwindow.cpp35
12 files changed, 11 insertions, 446 deletions
diff --git a/noncore/apps/opie-sheet/cell-select.xpm b/noncore/apps/opie-sheet/cell-select.xpm
deleted file mode 100644
index 4836c02..0000000
--- a/noncore/apps/opie-sheet/cell-select.xpm
+++ b/dev/null
@@ -1,25 +0,0 @@
-/* XPM */
-static const char *cell_select_xpm[]={
-"16 16 6 1",
-"# c None",
-"c c #0058c0",
-". c #585858",
-"b c #58a8ff",
-"a c #a8dcff",
-"d c #c0ffff",
-".###############",
-".#####...#######",
-"#...#.aab.######",
-"###..acaaa.#####",
-"###.aaacabc.####",
-"##.acaaaccab.###",
-"#.caacabbaaa.###",
-"#.ccaacbaaaaa.##",
-"#.bacbcaaaadaa.#",
-"##.bacbaaaddda.#",
-"###.bacaaaadaa.#",
-"####.bacaaaaac.#",
-"#####.bacaaacb.#",
-"######.bacccb.##",
-"#######.babb.###",
-"########....####"};
diff --git a/noncore/apps/opie-sheet/excel16.xpm b/noncore/apps/opie-sheet/excel16.xpm
deleted file mode 100644
index 45dd96d..0000000
--- a/noncore/apps/opie-sheet/excel16.xpm
+++ b/dev/null
@@ -1,187 +0,0 @@
-/* XPM */
-static const char *excel16_xpm[]={
-"16 16 168 2",
-"aL c None",
-"Qt c None",
-"aK c #24440a",
-"#y c #247d21",
-"#B c #276d1e",
-"aw c #284a0d",
-"au c #2b4e10",
-"#P c #2c6e1a",
-"ag c #2d5114",
-"ad c #2e541a",
-"af c #304326",
-"#2 c #317a1c",
-"ae c #334f25",
-"#5 c #335919",
-"#F c #375d1f",
-"#O c #3a872f",
-"#t c #3d6324",
-"ac c #3d7939",
-"#Y c #3e7132",
-"#p c #407f39",
-"#Z c #42903e",
-"#i c #436d28",
-".9 c #446e2a",
-"aJ c #466628",
-"av c #476430",
-"aI c #476829",
-".W c #47732d",
-"#K c #479643",
-"#1 c #48872e",
-"aH c #496b2d",
-".6 c #4a8a49",
-"aG c #4b6e31",
-".z c #4b7832",
-"#L c #4d9647",
-"aF c #4e7336",
-"aE c #52783b",
-".m c #527a3e",
-"#x c #529c4f",
-"#N c #549c4b",
-"aD c #567a3f",
-"#V c #579342",
-"#X c #588649",
-"aC c #598041",
-".T c #598955",
-"#A c #59a354",
-"#W c #5a8f48",
-"aB c #5d8745",
-"ax c #5d914d",
-"#o c #5ea657",
-"#C c #5f8755",
-"aA c #5f8947",
-".5 c #5f9f5a",
-"#e c #60965b",
-"#f c #609c5b",
-"az c #618b4a",
-".l c #629450",
-"ay c #679350",
-".k c #689854",
-"#U c #69a15f",
-"ah c #6c9c59",
-"#d c #6cae66",
-".R c #6da767",
-".S c #6ea564",
-"#n c #6eaf67",
-".3 c #6fad69",
-"#0 c #6fb067",
-".j c #719f5f",
-"ab c #729a6b",
-"#6 c #72a161",
-".2 c #74a270",
-"#J c #75b56d",
-".i c #76a366",
-"#l c #77ae74",
-"#M c #78b570",
-"#I c #79b176",
-".4 c #79b870",
-"#S c #7ba66b",
-".N c #7bb374",
-".h c #7da970",
-".1 c #7fbd76",
-"#G c #81ab74",
-"#c c #81bb78",
-".M c #83bb7b",
-"aa c #869782",
-".g c #86b079",
-"a# c #879783",
-"a. c #889885",
-"#u c #88b279",
-"#9 c #899886",
-".U c #89b188",
-".L c #89c081",
-".O c #8ab485",
-".0 c #8ac381",
-".f c #8eb580",
-"#j c #8eb680",
-".y c #91a483",
-"#m c #91c28a",
-"#. c #92b885",
-"#8 c #93ae91",
-".e c #93ba87",
-"#3 c #93be91",
-"at c #94a089",
-"#4 c #96a18b",
-"#z c #96c78d",
-".# c #97bc8a",
-"#D c #99b598",
-"#Q c #9abb99",
-"#R c #9ba890",
-".d c #9bbf90",
-"#E c #9ca991",
-"#s c #9ca992",
-"#b c #9dc895",
-"#h c #9fac95",
-".c c #9fc294",
-"#a c #a0c99b",
-".8 c #a2b198",
-".V c #a3b199",
-".b c #a4c699",
-".K c #a5b29b",
-".Z c #a6cf9f",
-".Y c #a7cda1",
-".a c #a9c99e",
-".n c #acc4a3",
-".x c #b2c3aa",
-"ai c #b4c4ab",
-".w c #b6c7ad",
-"#7 c #b7c7ae",
-".v c #b9cab1",
-"#T c #bbcab3",
-".u c #bbcbb3",
-".Q c #bbd0ba",
-"#H c #bccbb4",
-".t c #beceb7",
-".s c #c0d1ba",
-"#k c #c1d1bb",
-".r c #c2d1bc",
-"## c #c2d2bc",
-".X c #c4d5be",
-".q c #c6d9c1",
-".p c #c8d9c2",
-".o c #c9dac3",
-"#q c #cdddcd",
-"as c #d3e3d3",
-"ar c #d4e4d4",
-"aq c #d7e6d7",
-"ap c #d8e7d9",
-"ao c #dae9db",
-".7 c #dce8db",
-"#r c #dce9dc",
-"an c #ddebdd",
-"#g c #dfecdf",
-"am c #e1ede0",
-"al c #e3ede3",
-"#w c #e5efe5",
-"ak c #e6efe6",
-".J c #e7f0e7",
-"aj c #e8f0e8",
-".I c #eaf2ea",
-".P c #ebf3eb",
-".H c #ecf4ec",
-".G c #f0f5f0",
-".F c #f2f7f2",
-"#v c #f3f7f3",
-".E c #f4f8f4",
-".D c #f7f9f6",
-".C c #f9fbf8",
-".B c #fafcfa",
-".A c #fcfdfc",
-"QtQtQtQtQtQtQtQtQtQtQtQtQtQtQtQt",
-"Qt.#.a.b.c.d.e.f.g.h.i.j.k.l.mQt",
-"Qt.a.n.o.p.q.r.s.t.u.v.w.x.y.zQt",
-"Qt.b.o.A.B.C.D.E.F.G.H.I.J.K.zQt",
-"Qt.c.p.L.M.N.O.P.Q.R.S.T.U.V.WQt",
-"Qt.d.X.Y.Z.0.1.2.3.4.5.6.7.8.9Qt",
-"Qt#.##.D#a#b#c#d#e#f.6.7#g#h#iQt",
-"Qt#j#k.E.F#l#m#n#o#p#q#g#r#s#tQt",
-"Qt#u.s#v#w#x#y#z#A#A#B#C#D#E#FQt",
-"Qt#G#H.P#I#J#K#L#M#N#O#P#Q#R#FQt",
-"Qt#S#T#U#V#W#X#Y#Z#0#1#2#3#4#5Qt",
-"Qt#6#7#8#9a.a#aaabacadaeaf#4agQt",
-"QtahaiajakalamanaoapaqarasatauQt",
-"Qt.kavavavavavavavavavavavavawQt",
-"QtaxayazaAaBaCaDaEaFaGaHaIaJaKQt",
-"aLaLaLaLaLaLaLaLaLaLaLaLaLaLaLaL"};
diff --git a/noncore/apps/opie-sheet/func-comma.xpm b/noncore/apps/opie-sheet/func-comma.xpm
deleted file mode 100644
index 2e680d2..0000000
--- a/noncore/apps/opie-sheet/func-comma.xpm
+++ b/dev/null
@@ -1,24 +0,0 @@
-/* XPM */
-static const char *func_comma_xpm[]={
-"16 16 5 1",
-". c None",
-"# c #000000",
-"a c #0000ff",
-"b c #0058c0",
-"c c #0080ff",
-"................",
-"................",
-"................",
-"......###.......",
-".....#aaa#......",
-".....#bcca#.....",
-".....#bbaa#.....",
-"......##ba#.....",
-"........#b#.....",
-"........#b#.....",
-".......#b#......",
-"......#b#.......",
-"......##........",
-"................",
-"................",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-cross.xpm b/noncore/apps/opie-sheet/func-cross.xpm
deleted file mode 100644
index 3b3f3d5..0000000
--- a/noncore/apps/opie-sheet/func-cross.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_cross_xpm[]={
-"16 16 4 1",
-". c None",
-"b c #0000ff",
-"a c #0058c0",
-"# c #585858",
-"................",
-"................",
-"....#......##...",
-"...#a#....#ab#..",
-"..#bba#..#abb#..",
-"...#bba##abb#...",
-"....#bbaabb#....",
-".....#bbbb#.....",
-".....#bbbb#.....",
-"....#bbaabb#....",
-"...#bba##abb#...",
-"..#bba#..#abb#..",
-"..#ba#....#a#...",
-"...##......#....",
-"................",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-divide.xpm b/noncore/apps/opie-sheet/func-divide.xpm
deleted file mode 100644
index beb3473..0000000
--- a/noncore/apps/opie-sheet/func-divide.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_divide_xpm[]={
-"16 16 4 1",
-". c None",
-"# c #000000",
-"b c #0000ff",
-"a c #0058c0",
-"................",
-"................",
-"...........##...",
-"..........#ab#..",
-".........#aba#..",
-"........#bba#...",
-".......#bba#....",
-"......#bba#.....",
-".....#abb#......",
-"....#abb#.......",
-"...#abb#........",
-"..#aba#.........",
-"..#ba#..........",
-"...##...........",
-"................",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-equal.xpm b/noncore/apps/opie-sheet/func-equal.xpm
deleted file mode 100644
index 8f34895..0000000
--- a/noncore/apps/opie-sheet/func-equal.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_equal_xpm[]={
-"16 16 4 1",
-". c None",
-"b c #0000ff",
-"a c #0058c0",
-"# c #585858",
-"................",
-"................",
-"................",
-"...##########...",
-"..#aaabbbbaaa#..",
-"..#bbbbbbbbbb#..",
-"..############..",
-"................",
-"................",
-"..############..",
-"..#bbbbbbbbbb#..",
-"..#aaabbbbaaa#..",
-"...##########...",
-"................",
-"................",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-func.xpm b/noncore/apps/opie-sheet/func-func.xpm
deleted file mode 100644
index b9ec747..0000000
--- a/noncore/apps/opie-sheet/func-func.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_func_xpm[]={
-"16 16 4 1",
-". c None",
-"a c #0000ff",
-"b c #0058c0",
-"# c #585858",
-"................",
-".........#ab....",
-".......#aa##....",
-".......ab#......",
-".......ab#......",
-"......#a#.......",
-"....#aaaa#......",
-"....bbabbb......",
-"....##ab#a#.ba..",
-".....aa##baba#..",
-".....ab#.#ba#...",
-".....ab#.baba...",
-"....#a#.ba##ba..",
-"....ab#..#..#b..",
-"...#a#..........",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-minus.xpm b/noncore/apps/opie-sheet/func-minus.xpm
deleted file mode 100644
index b747bd7..0000000
--- a/noncore/apps/opie-sheet/func-minus.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_minus_xpm[]={
-"16 16 4 1",
-". c None",
-"a c #0000ff",
-"b c #0058c0",
-"# c #585858",
-"................",
-"................",
-"................",
-"................",
-"................",
-"................",
-"...##########...",
-"...#aaaaaabb#...",
-"...#bbaaaaaa#...",
-"...##########...",
-"................",
-"................",
-"................",
-"................",
-"................",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-paran-close.xpm b/noncore/apps/opie-sheet/func-paran-close.xpm
deleted file mode 100644
index 1e9994c..0000000
--- a/noncore/apps/opie-sheet/func-paran-close.xpm
+++ b/dev/null
@@ -1,24 +0,0 @@
-/* XPM */
-static const char *func_paran_close_xpm[]={
-"16 16 5 1",
-"c c None",
-". c None",
-"b c #0000ff",
-"# c #0058c0",
-"a c #585858",
-"......#a........",
-"......#baa......",
-".......#bba.....",
-"........#b#.....",
-"........c##a....",
-"........c#ba....",
-"........c#ba....",
-"........c#ba....",
-"........c#ba....",
-"........c#ba....",
-"........#b#a....",
-".......abb#.....",
-".......#bba.....",
-"......#baa......",
-"......#a........",
-"................"};
diff --git a/noncore/apps/opie-sheet/func-paran-open.xpm b/noncore/apps/opie-sheet/func-paran-open.xpm
deleted file mode 100644
index ace24b0..0000000
--- a/noncore/apps/opie-sheet/func-paran-open.xpm
+++ b/dev/null
@@ -1,24 +0,0 @@
-/* XPM */
-static const char *func_paran_open_xpm[]={
-"16 16 5 1",
-"c c None",
-". c None",
-"b c #0000ff",
-"a c #0058c0",
-"# c #585858",
-"........#a......",
-"......##ba......",
-".....#bba.......",
-".....aba........",
-"....#aacc.......",
-"....#bacc.......",
-"....#bacc.......",
-"....#bacc.......",
-"....#bac........",
-"....#bac........",
-"....#aac........",
-".....abbc.......",
-".....#bba.......",
-"......##bac.....",
-"........#ac.....",
-"..........c....."};
diff --git a/noncore/apps/opie-sheet/func-plus.xpm b/noncore/apps/opie-sheet/func-plus.xpm
deleted file mode 100644
index c779f23..0000000
--- a/noncore/apps/opie-sheet/func-plus.xpm
+++ b/dev/null
@@ -1,23 +0,0 @@
-/* XPM */
-static const char *func_plus_xpm[]={
-"16 16 4 1",
-". c None",
-"a c #0000ff",
-"b c #0058c0",
-"# c #585858",
-"................",
-"................",
-"......####......",
-"......#ab#......",
-"......#ab#......",
-"......#ab#......",
-"..####babb####..",
-"..#aaaaaabbbb#..",
-"..#bbbbaaaaaa#..",
-"..####bbab####..",
-"......#ba#......",
-"......#ba#......",
-"......#ba#......",
-"......####......",
-"................",
-"................"};
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
@@ -6,61 +6,48 @@
* (at your option) any later version. *
* *
***************************************************************************/
/*
* Opie Sheet (formerly Sheet/Qt)
* by Serdar Ozler <sozler@sitebest.com>
*/
#include "mainwindow.h"
#include <qpe/filemanager.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/resource.h>
#include <qmessagebox.h>
#include <qfile.h>
#include <qtranslator.h>
#include <qradiobutton.h>
#include "cellformat.h"
#include "numberdlg.h"
#include "textdlg.h"
#include "sortdlg.h"
#include "finddlg.h"
-
-#include "func-plus.xpm"
-#include "func-minus.xpm"
-#include "func-cross.xpm"
-#include "func-divide.xpm"
-#include "func-paran-open.xpm"
-#include "func-paran-close.xpm"
-#include "func-comma.xpm"
-#include "func-func.xpm"
-#include "func-equal.xpm"
-#include "cell-select.xpm"
-#include "excel16.xpm"
-
#define DEFAULT_NUM_ROWS 300
#define DEFAULT_NUM_COLS (26*3)
#define DEFAULT_NUM_SHEETS 3
MainWindow::MainWindow(QWidget *parent, const char* n, WFlags fl)
:QMainWindow(parent, n, fl)
{
// initialize variables
documentModified=FALSE;
// construct objects
currentDoc=0;
fileSelector=new FileSelector("application/sheet-qt", this, QString::null);
ExcelSelector=new FileSelector("application/excel",this,QString::null,FALSE);
connect(fileSelector, SIGNAL(closeMe()), this, SLOT(selectorHide()));
connect(fileSelector, SIGNAL(newSelected(const DocLnk &)), this, SLOT(selectorFileNew(const DocLnk &)));
connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)), this, SLOT(selectorFileOpen(const DocLnk &)));
connect(ExcelSelector,SIGNAL(fileSelected(const DocLnk &)),this,SLOT(slotImportExcel(const DocLnk &)));
connect(ExcelSelector,SIGNAL(closeMe()), this, SLOT(ExcelSelectorHide()));
listSheets.setAutoDelete(TRUE);
initActions();
@@ -272,61 +259,61 @@ void MainWindow::ExcelSelectorHide()
void MainWindow::slotFileSave()
{
saveCurrentFile(FALSE);
}
void MainWindow::setDocument(const QString &applnk_filename)
{
selectorFileOpen(DocLnk(applnk_filename));
}
void MainWindow::initActions()
{
fileNew=new QAction(tr("New File"), Resource::loadPixmap( "new" ), tr("&New"), 0, this);
connect(fileNew, SIGNAL(activated()), this, SLOT(slotFileNew()));
fileOpen=new QAction(tr("Open File"), Resource::loadPixmap( "fileopen" ), tr("&Open"), 0, this);
connect(fileOpen, SIGNAL(activated()), this, SLOT(slotFileOpen()));
fileSave=new QAction(tr("Save File"),Resource::loadPixmap( "save" ), tr("&Save"), 0, this);
connect(fileSave, SIGNAL(activated()), this, SLOT(slotFileSave()));
fileSaveAs=new QAction(tr("Save File As"), Resource::loadPixmap( "save" ), tr("Save &As"), 0, this);
connect(fileSaveAs, SIGNAL(activated()), this, SLOT(slotFileSaveAs()));
//fileQuit=new QAction(tr("Quit"), tr("&Quit"), 0, this);
//connect(fileQuit, SIGNAL(activated()), this, SLOT(close()));
- fileExcelImport=new QAction(tr("Import Excel file"),QPixmap(excel16_xpm),tr("Import E&xcel file"),0,this);
+ fileExcelImport=new QAction(tr("Import Excel file"),Resource::loadPixmap( "/opie-sheet/excel16" ),tr("Import E&xcel file"),0,this);
connect(fileExcelImport, SIGNAL(activated()), this, SLOT(slotImportExcelOpen()));
// helpGeneral=new QAction(tr("General Help"), QPixmap(help_general_xpm), tr("&General"), 0, this);
//connect(helpGeneral, SIGNAL(activated()), this, SLOT(slotHelpGeneral()));
//helpAbout=new QAction(tr("About Opie Sheet"), tr("&About"), 0, this);
//connect(helpAbout, SIGNAL(activated()), this, SLOT(slotHelpAbout()));
editAccept=new QAction(tr("Accept"),Resource::loadPixmap( "enter" ) , tr("&Accept"), 0, this);
connect(editAccept, SIGNAL(activated()), this, SLOT(slotEditAccept()));
editCancel=new QAction(tr("Cancel"), Resource::loadPixmap( "close" ), tr("&Cancel"), 0, this);
connect(editCancel, SIGNAL(activated()), this, SLOT(slotEditCancel()));
- editCellSelect=new QAction(tr("Cell Selector"), QPixmap(cell_select_xpm), tr("Cell &Selector"), 0, this);
+ editCellSelect=new QAction(tr("Cell Selector"), Resource::loadPixmap( "opie-sheet/cell_select" ), tr("Cell &Selector"), 0, this);
editCellSelect->setToggleAction(TRUE);
connect(editCellSelect, SIGNAL(toggled(bool)), this, SLOT(slotCellSelect(bool)));
editCut=new QAction(tr("Cut Cells"), tr("Cu&t"), 0, this);
editCopy=new QAction(tr("Copy Cells"), tr("&Copy"), 0, this);
editPaste=new QAction(tr("Paste Cells"), tr("&Paste"), 0, this);
connect(editPaste, SIGNAL(activated()), this, SLOT(slotEditPaste()));
editPasteContents=new QAction(tr("Paste Contents"), tr("Paste Cont&ents"), 0, this);
connect(editPasteContents, SIGNAL(activated()), this, SLOT(slotEditPasteContents()));
editClear=new QAction(tr("Clear Cells"), tr("C&lear"), 0, this);
insertCells=new QAction(tr("Insert Cells"), tr("C&ells"), 0, this);
connect(insertCells, SIGNAL(activated()), this, SLOT(slotInsertCells()));
insertRows=new QAction(tr("Insert Rows"), tr("&Rows"), 0, this);
connect(insertRows, SIGNAL(activated()), this, SLOT(slotInsertRows()));
insertCols=new QAction(tr("Insert Columns"), tr("&Columns"), 0, this);
connect(insertCols, SIGNAL(activated()), this, SLOT(slotInsertCols()));
insertSheets=new QAction(tr("Add Sheets"), tr("&Sheets"), 0, this);
connect(insertSheets, SIGNAL(activated()), this, SLOT(slotInsertSheets()));
formatCells=new QAction(tr("Cells"), tr("&Cells"), 0, this);
connect(formatCells, SIGNAL(activated()), this, SLOT(slotFormatCells()));
rowHeight=new QAction(tr("Row Height"), tr("H&eight"), 0, this);
connect(rowHeight, SIGNAL(activated()), this, SLOT(slotRowHeight()));
@@ -335,70 +322,70 @@ void MainWindow::initActions()
rowShow=new QAction(tr("Show Row"), tr("&Show"), 0, this);
connect(rowShow, SIGNAL(activated()), this, SLOT(slotRowShow()));
rowHide=new QAction(tr("Hide Row"), tr("&Hide"), 0, this);
connect(rowHide, SIGNAL(activated()), this, SLOT(slotRowHide()));
colWidth=new QAction(tr("Column Width"), tr("&Width"), 0, this);
connect(colWidth, SIGNAL(activated()), this, SLOT(slotColumnWidth()));
colAdjust=new QAction(tr("Adjust Column"), tr("&Adjust"), 0, this);
connect(colAdjust, SIGNAL(activated()), this, SLOT(slotColumnAdjust()));
colShow=new QAction(tr("Show Column"), tr("&Show"), 0, this);
connect(colShow, SIGNAL(activated()), this, SLOT(slotColumnShow()));
colHide=new QAction(tr("Hide Column"), tr("&Hide"), 0, this);
connect(colHide, SIGNAL(activated()), this, SLOT(slotColumnHide()));
sheetRename=new QAction(tr("Rename Sheet"), tr("&Rename"), 0, this);
connect(sheetRename, SIGNAL(activated()), this, SLOT(slotSheetRename()));
sheetRemove=new QAction(tr("Remove Sheet"), tr("R&emove"), 0, this);
connect(sheetRemove, SIGNAL(activated()), this, SLOT(slotSheetRemove()));
dataSort=new QAction(tr("Sort Data"), tr("&Sort"), 0, this);
connect(dataSort, SIGNAL(activated()), this, SLOT(slotDataSort()));
dataFindReplace=new QAction(tr("Find && Replace"), tr("&Find && Replace"), 0, this);
connect(dataFindReplace, SIGNAL(activated()), this, SLOT(slotDataFindReplace()));
- funcEqual=new QAction(tr("Equal To"), QPixmap(func_equal_xpm), tr("&Equal To"), 0, this);
+ funcEqual=new QAction(tr("Equal To"), Resource::loadPixmap( "opie-sheet/func_equal" ), tr("&Equal To"), 0, this);
funcEqual->setToolTip("=");
connect(funcEqual, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcPlus=new QAction(tr("Addition"), QPixmap(func_plus_xpm), tr("&Addition"), 0, this);
+ funcPlus=new QAction(tr("Addition"), Resource::loadPixmap( "opie-sheet/func_plus" ), tr("&Addition"), 0, this);
funcPlus->setToolTip("+");
connect(funcPlus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcMinus=new QAction(tr("Subtraction"), QPixmap(func_minus_xpm), tr("&Subtraction"), 0, this);
+ funcMinus=new QAction(tr("Subtraction"), Resource::loadPixmap( "opie-sheet/func_minus" ), tr("&Subtraction"), 0, this);
funcMinus->setToolTip("-");
connect(funcMinus, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcCross=new QAction(tr("Multiplication"), QPixmap(func_cross_xpm), tr("&Multiplication"), 0, this);
+ funcCross=new QAction(tr("Multiplication"), Resource::loadPixmap ("opie-sheet/func_cross" ), tr("&Multiplication"), 0, this);
funcCross->setToolTip("*");
connect(funcCross, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcDivide=new QAction(tr("Division"), QPixmap(func_divide_xpm), tr("&Division"), 0, this);
+ funcDivide=new QAction(tr("Division"), Resource::loadPixmap( "opie-sheet/func_divide" ), tr("&Division"), 0, this);
funcDivide->setToolTip("/");
connect(funcDivide, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), QPixmap(func_paran_open_xpm), tr("&Open Paranthesis"), 0, this);
+ funcParanOpen=new QAction(tr("Open ParanthesistempCellData->row+row1, tempCellData->col+col1"), Resource::loadPixmap( "opie-sheet/func_paran_open" ), tr("&Open Paranthesis"), 0, this);
funcParanOpen->setToolTip("(");
connect(funcParanOpen, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcParanClose=new QAction(tr("Close Paranthesis"), QPixmap(func_paran_close_xpm), tr("&Close Paranthesis"), 0, this);
+ funcParanClose=new QAction(tr("Close Paranthesis"), Resource::loadPixmap( "opie-sheet/func_paran_close" ), tr("&Close Paranthesis"), 0, this);
funcParanClose->setToolTip(")");
connect(funcParanClose, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
- funcComma=new QAction(tr("Comma"), QPixmap(func_comma_xpm), tr("&Comma"), 0, this);
+ funcComma=new QAction(tr("Comma"), Resource::loadPixmap( "opie-sheet/func_comma" ), tr("&Comma"), 0, this);
funcComma->setToolTip(",");
connect(funcComma, SIGNAL(activated()), this, SLOT(slotFuncOutput()));
}
void MainWindow::initMenu()
{
menu=new QMenuBar(this);
menuFile=new QPopupMenu;
fileNew->addTo(menuFile);
fileOpen->addTo(menuFile);
fileSave->addTo(menuFile);
fileSaveAs->addTo(menuFile);
// menuFile->insertSeparator();
// fileQuit->addTo(menuFile);
menuFile->insertSeparator();
fileExcelImport->addTo(menuFile);
menu->insertItem(tr("&File"), menuFile);
menuEdit=new QPopupMenu;
editAccept->addTo(menuEdit);
editCancel->addTo(menuEdit);
editCellSelect->addTo(menuEdit);
menuEdit->insertSeparator();
@@ -592,49 +579,49 @@ void MainWindow::initStandardToolbar()
fileOpen->addTo(toolbarStandard);
fileSave->addTo(toolbarStandard);
comboSheets=new QComboBox(toolbarStandard);
toolbarStandard->setStretchableWidget(comboSheets);
connect(comboSheets, SIGNAL(activated(const QString &)), this, SLOT(slotSheetChanged(const QString &)));
}
void MainWindow::initFunctionsToolbar()
{
toolbarFunctions=new QToolBar(this);
toolbarFunctions->setHorizontalStretchable(TRUE);
moveToolBar(toolbarFunctions, Bottom);
funcEqual->addTo(toolbarFunctions);
funcPlus->addTo(toolbarFunctions);
funcMinus->addTo(toolbarFunctions);
funcCross->addTo(toolbarFunctions);
funcDivide->addTo(toolbarFunctions);
funcParanOpen->addTo(toolbarFunctions);
funcParanClose->addTo(toolbarFunctions);
funcComma->addTo(toolbarFunctions);
toolFunction=new QToolButton(toolbarFunctions);
- toolFunction->setPixmap(func_func_xpm);
+ toolFunction->setPixmap(Resource::loadPixmap( "opie-sheet/func_func" ));
toolFunction->setTextLabel(tr("Functions"));
toolFunction->setPopup(submenuFunc);
toolFunction->setPopupDelay(0);
}
void MainWindow::initEditToolbar()
{
toolbarEdit=new QToolBar(this);
toolbarEdit->setHorizontalStretchable(TRUE);
moveToolBar(toolbarEdit, Bottom);
editAccept->addTo(toolbarEdit);
editCancel->addTo(toolbarEdit);
editData=new QLineEdit(toolbarEdit);
toolbarEdit->setStretchableWidget(editData);
connect(editData, SIGNAL(returnPressed()), this, SLOT(slotEditAccept()));
editCellSelect->addTo(toolbarEdit);
}
void MainWindow::slotHelpAbout()
{
QDialog dialogAbout(this, 0, TRUE);