Diffstat (limited to 'noncore/apps/opie-sheet/cellformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/cellformat.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/cellformat.cpp b/noncore/apps/opie-sheet/cellformat.cpp index 6a2ff72..597502c 100644 --- a/noncore/apps/opie-sheet/cellformat.cpp +++ b/noncore/apps/opie-sheet/cellformat.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 "cellformat.h" | 15 | #include "cellformat.h" |
2 | 16 | ||
3 | #include <qlistbox.h> | 17 | #include <qlistbox.h> |
4 | #include <qlabel.h> | 18 | #include <qlabel.h> |
5 | 19 | ||
6 | #define COMBO_WIDTHS 155 | 20 | #define COMBO_WIDTHS 155 |
7 | #define COMBO_HEIGHTS 21 | 21 | #define COMBO_HEIGHTS 21 |
8 | 22 | ||
9 | #define COLOR_COUNT 17 | 23 | #define COLOR_COUNT 17 |
10 | #define STYLE_COUNT 14 | 24 | #define STYLE_COUNT 14 |
11 | #define HALIGN_COUNT 3 | 25 | #define HALIGN_COUNT 3 |
12 | #define VALIGN_COUNT 3 | 26 | #define VALIGN_COUNT 3 |
13 | 27 | ||
14 | QColor qtColors[COLOR_COUNT]={Qt::black, Qt::white, Qt::darkGray, Qt::gray, Qt::lightGray, Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::darkRed, Qt::darkGreen, Qt::darkBlue, Qt::darkCyan, Qt::darkMagenta, Qt::darkYellow}; | 28 | QColor qtColors[COLOR_COUNT]={Qt::black, Qt::white, Qt::darkGray, Qt::gray, Qt::lightGray, Qt::red, Qt::green, Qt::blue, Qt::cyan, Qt::magenta, Qt::yellow, Qt::darkRed, Qt::darkGreen, Qt::darkBlue, Qt::darkCyan, Qt::darkMagenta, Qt::darkYellow}; |
15 | Qt::BrushStyle brushStyles[STYLE_COUNT]={Qt::SolidPattern, Qt::Dense1Pattern, Qt::Dense2Pattern, Qt::Dense3Pattern, Qt::Dense4Pattern, Qt::Dense5Pattern, Qt::Dense6Pattern, Qt::Dense7Pattern, Qt::HorPattern, Qt::VerPattern, Qt::CrossPattern, Qt::BDiagPattern, Qt::FDiagPattern, Qt::DiagCrossPattern}; | 29 | Qt::BrushStyle brushStyles[STYLE_COUNT]={Qt::SolidPattern, Qt::Dense1Pattern, Qt::Dense2Pattern, Qt::Dense3Pattern, Qt::Dense4Pattern, Qt::Dense5Pattern, Qt::Dense6Pattern, Qt::Dense7Pattern, Qt::HorPattern, Qt::VerPattern, Qt::CrossPattern, Qt::BDiagPattern, Qt::FDiagPattern, Qt::DiagCrossPattern}; |
16 | QString namesHAlign[HALIGN_COUNT]={"Left", "Right", "Center"}; | 30 | QString namesHAlign[HALIGN_COUNT]={"Left", "Right", "Center"}; |
17 | QString namesVAlign[VALIGN_COUNT]={"Top", "Bottom", "Center"}; | 31 | QString namesVAlign[VALIGN_COUNT]={"Top", "Bottom", "Center"}; |
18 | Qt::AlignmentFlags flagsHAlign[HALIGN_COUNT]={Qt::AlignLeft, Qt::AlignRight, Qt::AlignHCenter}; | 32 | Qt::AlignmentFlags flagsHAlign[HALIGN_COUNT]={Qt::AlignLeft, Qt::AlignRight, Qt::AlignHCenter}; |
19 | Qt::AlignmentFlags flagsVAlign[VALIGN_COUNT]={Qt::AlignTop, Qt::AlignBottom, Qt::AlignVCenter}; | 33 | Qt::AlignmentFlags flagsVAlign[VALIGN_COUNT]={Qt::AlignTop, Qt::AlignBottom, Qt::AlignVCenter}; |
20 | 34 | ||
21 | CellFormat::CellFormat(QWidget *parent=0) | 35 | CellFormat::CellFormat(QWidget *parent=0) |
22 | :QDialog(parent, 0, TRUE) | 36 | :QDialog(parent, 0, TRUE) |
23 | { | 37 | { |
24 | // Main widget | 38 | // Main widget |