Diffstat (limited to 'noncore/apps/opie-sheet/sheet.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/sheet.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/sheet.cpp b/noncore/apps/opie-sheet/sheet.cpp index 9526937..1d7ec6f 100644 --- a/noncore/apps/opie-sheet/sheet.cpp +++ b/noncore/apps/opie-sheet/sheet.cpp | |||
@@ -1,24 +1,38 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * This program is free software; you can redistribute it and/or modify * | ||
4 | * it under the terms of the GNU General Public License as published by * | ||
5 | * the Free Software Foundation; either version 2 of the License, or * | ||
6 | * (at your option) any later version. * | ||
7 | * * | ||
8 | ***************************************************************************/ | ||
9 | |||
10 | /* | ||
11 | * Opie Sheet (formerly Sheet/Qt) | ||
12 | * by Serdar Ozler <sozler@sitebest.com> | ||
13 | */ | ||
14 | |||
1 | #include "sheet.h" | 15 | #include "sheet.h" |
2 | 16 | ||
3 | #include <qmainwindow.h> | 17 | #include <qmainwindow.h> |
4 | #include <qmessagebox.h> | 18 | #include <qmessagebox.h> |
5 | #include <math.h> | 19 | #include <math.h> |
6 | 20 | ||
7 | #define DEFAULT_COL_WIDTH 50 | 21 | #define DEFAULT_COL_WIDTH 50 |
8 | 22 | ||
9 | Sheet::Sheet(int numRows, int numCols, QWidget *parent) | 23 | Sheet::Sheet(int numRows, int numCols, QWidget *parent) |
10 | :QTable(numRows, numCols, parent) | 24 | :QTable(numRows, numCols, parent) |
11 | { | 25 | { |
12 | defaultBorders.right=defaultBorders.bottom=QPen(Qt::gray, 1, Qt::SolidLine); | 26 | defaultBorders.right=defaultBorders.bottom=QPen(Qt::gray, 1, Qt::SolidLine); |
13 | defaultCellData.data=""; | 27 | defaultCellData.data=""; |
14 | defaultCellData.background=QBrush(Qt::white, Qt::SolidPattern); | 28 | defaultCellData.background=QBrush(Qt::white, Qt::SolidPattern); |
15 | defaultCellData.alignment=(Qt::AlignmentFlags)(Qt::AlignLeft | Qt::AlignTop); | 29 | defaultCellData.alignment=(Qt::AlignmentFlags)(Qt::AlignLeft | Qt::AlignTop); |
16 | defaultCellData.fontColor=Qt::black; | 30 | defaultCellData.fontColor=Qt::black; |
17 | defaultCellData.font=font(); | 31 | defaultCellData.font=font(); |
18 | defaultCellData.borders=defaultBorders; | 32 | defaultCellData.borders=defaultBorders; |
19 | 33 | ||
20 | selectionNo=-1; | 34 | selectionNo=-1; |
21 | setSelectionMode(QTable::Single); | 35 | setSelectionMode(QTable::Single); |
22 | 36 | ||
23 | sheetData.setAutoDelete(TRUE); | 37 | sheetData.setAutoDelete(TRUE); |
24 | clipboardData.setAutoDelete(TRUE); | 38 | clipboardData.setAutoDelete(TRUE); |