summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/cellformat.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-sheet/cellformat.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/cellformat.h142
1 files changed, 82 insertions, 60 deletions
diff --git a/noncore/apps/opie-sheet/cellformat.h b/noncore/apps/opie-sheet/cellformat.h
index b569b7f..e07af9c 100644
--- a/noncore/apps/opie-sheet/cellformat.h
+++ b/noncore/apps/opie-sheet/cellformat.h
@@ -1,9 +1,28 @@
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
+/*
+ =. This file is part of the Opie Project
+ .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org>
+ .>+-=
+ _;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+ - . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+ : = ...= . :.=-
+ -. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+*/
@@ -17,3 +36,8 @@
+#include "sheet.h"
+
+/* OPIE */
#include <qpe/fontdatabase.h>
+
+/* QT */
#include <qdialog.h>
@@ -25,18 +49,16 @@
-#include "sheet.h"
-
class BorderEditor: public QFrame
{
- Q_OBJECT
+ Q_OBJECT
- // QT objects
- QPen penTop, penBottom, penLeft, penRight, penHorz, penVert;
+ // QT objects
+ QPen penTop, penBottom, penLeft, penRight, penHorz, penVert;
- // Private functions
- void drawContents(QPainter *p);
+ // Private functions
+ void drawContents(QPainter *p);
- // Reimplemented QFrame functions
- void mouseReleaseEvent(QMouseEvent *e);
+ // Reimplemented QFrame functions
+ void mouseReleaseEvent(QMouseEvent *e);
- public:
+public:
// Definitions
@@ -51,3 +73,3 @@ class BorderEditor: public QFrame
- signals:
+signals:
void clicked(BorderEditor::BorderArea);
@@ -57,42 +79,42 @@ class CellFormat: public QDialog
{
- Q_OBJECT
-
- enum comboType {COMBO_OTHER, COMBO_WIDTH, COMBO_FONT, COMBO_SIZE, COMBO_STYLE, COMBO_COLOR, COMBO_VALIGN, COMBO_HALIGN};
-
- // QT objects
- QBoxLayout *box;
- QTabWidget *tabs;
- QWidget *widgetBorders, *widgetBackground, *widgetFont, *widgetAlignment;
- QComboBox *comboBordersWidth, *comboBordersColor, *comboBackgroundColor, *comboBackgroundStyle, *comboFontColor, *comboFontSize, *comboFontFamily, *comboAlignmentVertical, *comboAlignmentHorizontal;
- QCheckBox *checkFontBold, *checkFontItalic, *checkAlignmentWrap;
- QPushButton *buttonBordersDefaults, *buttonBackgroundDefaults, *buttonFontDefaults, *buttonAlignmentDefaults;
- QFrame *frameBackground, *frameFont, *frameAlignment;
- QBrush brushBackground;
- QFont fontFont;
- QColor fontColor;
- Qt::AlignmentFlags textAlignment;
- FontDatabase fontDB;
-
- // Other objects & variables
- Sheet *sheet;
- BorderEditor *borderEditor;
- bool changedFont, changedAlign, changedBrush;
-
- // Private functions
- void createWidthCombo(QComboBox *combo);
- void createFontCombo(QComboBox *combo);
- void createHAlignCombo(QComboBox *combo);
- void createVAlignCombo(QComboBox *combo);
- void createStyleCombo(QComboBox *combo);
- void createSizeCombo(QComboBox *combo);
- void createColorCombo(QComboBox *combo);
- QComboBox *createCombo(comboType type, QWidget *parent, const QString &caption, int y);
-
- int findHAlignIndex(Qt::AlignmentFlags flag);
- int findVAlignIndex(Qt::AlignmentFlags flag);
- int findComboItemIndex(QComboBox *combo, const QString &item);
- int findColorIndex(const QColor &color);
- int findBrushStyleIndex(Qt::BrushStyle style);
-
- private slots:
+ Q_OBJECT
+
+ enum comboType {COMBO_OTHER, COMBO_WIDTH, COMBO_FONT, COMBO_SIZE, COMBO_STYLE, COMBO_COLOR, COMBO_VALIGN, COMBO_HALIGN};
+
+ // QT objects
+ QBoxLayout *box;
+ QTabWidget *tabs;
+ QWidget *widgetBorders, *widgetBackground, *widgetFont, *widgetAlignment;
+ QComboBox *comboBordersWidth, *comboBordersColor, *comboBackgroundColor, *comboBackgroundStyle, *comboFontColor, *comboFontSize, *comboFontFamily, *comboAlignmentVertical, *comboAlignmentHorizontal;
+ QCheckBox *checkFontBold, *checkFontItalic, *checkAlignmentWrap;
+ QPushButton *buttonBordersDefaults, *buttonBackgroundDefaults, *buttonFontDefaults, *buttonAlignmentDefaults;
+ QFrame *frameBackground, *frameFont, *frameAlignment;
+ QBrush brushBackground;
+ QFont fontFont;
+ QColor fontColor;
+ Qt::AlignmentFlags textAlignment;
+ FontDatabase fontDB;
+
+ // Other objects & variables
+ Sheet *sheet;
+ BorderEditor *borderEditor;
+ bool changedFont, changedAlign, changedBrush;
+
+ // Private functions
+ void createWidthCombo(QComboBox *combo);
+ void createFontCombo(QComboBox *combo);
+ void createHAlignCombo(QComboBox *combo);
+ void createVAlignCombo(QComboBox *combo);
+ void createStyleCombo(QComboBox *combo);
+ void createSizeCombo(QComboBox *combo);
+ void createColorCombo(QComboBox *combo);
+ QComboBox *createCombo(comboType type, QWidget *parent, const QString &caption, int y);
+
+ int findHAlignIndex(Qt::AlignmentFlags flag);
+ int findVAlignIndex(Qt::AlignmentFlags flag);
+ int findComboItemIndex(QComboBox *combo, const QString &item);
+ int findColorIndex(const QColor &color);
+ int findBrushStyleIndex(Qt::BrushStyle style);
+
+private slots:
void borderClicked(BorderEditor::BorderArea area);
@@ -108,3 +130,3 @@ class CellFormat: public QDialog
- public:
+public:
CellFormat(QWidget *parent=0);