author | cniehaus <cniehaus> | 2002-09-17 21:57:22 (UTC) |
---|---|---|
committer | cniehaus <cniehaus> | 2002-09-17 21:57:22 (UTC) |
commit | 01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0 (patch) (unidiff) | |
tree | 7a4df143ed5acaedf41eb5b4399117fdaf18bb38 | |
parent | d09947cc7ead59747feb10679ba6ba0a9db20a74 (diff) | |
download | opie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.zip opie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.tar.gz opie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.tar.bz2 |
added the future super-nice-and-cool-widget oxyframe and removed some
obsolte #include<>
-rw-r--r-- | noncore/apps/oxygen/dataTable.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/oxygen/dataTable.h | 2 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxyframe.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxyframe.h | 26 | ||||
-rw-r--r-- | noncore/apps/oxygen/oxygen.pro | 2 | ||||
-rw-r--r-- | noncore/apps/oxygen/psewidget.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/oxygen/psewidget.h | 8 |
7 files changed, 52 insertions, 12 deletions
diff --git a/noncore/apps/oxygen/dataTable.cpp b/noncore/apps/oxygen/dataTable.cpp index 6c6b9dc..bb786ea 100644 --- a/noncore/apps/oxygen/dataTable.cpp +++ b/noncore/apps/oxygen/dataTable.cpp | |||
@@ -1,39 +1,34 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * ( at your option ) any later version. * | 6 | * ( at your option ) any later version. * |
7 | * * | 7 | * * |
8 | **************************************************************************/ | 8 | **************************************************************************/ |
9 | #include "oxygen.h" | ||
10 | 9 | ||
11 | #include "dataTable.h" | 10 | #include "dataTable.h" |
12 | #include <qtable.h> | ||
13 | 11 | ||
14 | OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, | 12 | OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, |
15 | const char *name) : QTable(numRows, numRows, parent, name) | 13 | const char *name) : QTable(numRows, numRows, parent, name) |
16 | { | 14 | { |
17 | } | 15 | } |
18 | 16 | ||
19 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) | 17 | void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) |
20 | { | 18 | { |
21 | if ( cr.width() == 0 || cr.height() == 0 ) | 19 | if ( cr.width() == 0 || cr.height() == 0 ) |
22 | return; | 20 | return; |
23 | selected = FALSE; | 21 | selected = FALSE; |
24 | 22 | ||
25 | int w = cr.width(); | ||
26 | int h = cr.height(); | ||
27 | |||
28 | QTableItem *itm = item( row, col ); | 23 | QTableItem *itm = item( row, col ); |
29 | QColorGroup colgrp = colorGroup(); | 24 | QColorGroup colgrp = colorGroup(); |
30 | if ( itm ) | 25 | if ( itm ) |
31 | { | 26 | { |
32 | if ( row%2 ) | 27 | if ( row%2 ) |
33 | colgrp.setColor( QColorGroup::Base, QColor( cyan ) ); | 28 | colgrp.setColor( QColorGroup::Base, QColor( cyan ) ); |
34 | else | 29 | else |
35 | colgrp.setColor( QColorGroup::Base, QColor( white ) ); | 30 | colgrp.setColor( QColorGroup::Base, QColor( white ) ); |
36 | p->save(); | 31 | p->save(); |
37 | itm->paint( p, colgrp, cr, selected ); | 32 | itm->paint( p, colgrp, cr, selected ); |
38 | p->restore(); | 33 | p->restore(); |
39 | } | 34 | } |
diff --git a/noncore/apps/oxygen/dataTable.h b/noncore/apps/oxygen/dataTable.h index 5adbcc2..908d241 100644 --- a/noncore/apps/oxygen/dataTable.h +++ b/noncore/apps/oxygen/dataTable.h | |||
@@ -2,33 +2,31 @@ | |||
2 | /*************************************************************************** | 2 | /*************************************************************************** |
3 | * * | 3 | * * |
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * |
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * |
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * |
7 | * ( at your option ) any later version. * | 7 | * ( at your option ) any later version. * |
8 | * * | 8 | * * |
9 | **************************************************************************/ | 9 | **************************************************************************/ |
10 | 10 | ||
11 | #ifndef _DATATABLE_H | 11 | #ifndef _DATATABLE_H |
12 | #define _DATATABLE_H | 12 | #define _DATATABLE_H |
13 | 13 | ||
14 | |||
15 | #include <qtable.h> | 14 | #include <qtable.h> |
16 | 15 | ||
17 | class OxydataTable : public QTable | 16 | class OxydataTable : public QTable |
18 | { | 17 | { |
19 | Q_OBJECT | 18 | Q_OBJECT |
20 | 19 | ||
21 | public: | 20 | public: |
22 | OxydataTable(); | ||
23 | OxydataTable( int numRows, int numCols, | 21 | OxydataTable( int numRows, int numCols, |
24 | QWidget *parent = 0, const char *name = 0 ); | 22 | QWidget *parent = 0, const char *name = 0 ); |
25 | 23 | ||
26 | protected: | 24 | protected: |
27 | /* | 25 | /* |
28 | * This method is reimplemented form QTable. It implements the colourisation | 26 | * This method is reimplemented form QTable. It implements the colourisation |
29 | * of every second row. | 27 | * of every second row. |
30 | */ | 28 | */ |
31 | virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); | 29 | virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); |
32 | }; | 30 | }; |
33 | 31 | ||
34 | #endif | 32 | #endif |
diff --git a/noncore/apps/oxygen/oxyframe.cpp b/noncore/apps/oxygen/oxyframe.cpp new file mode 100644 index 0000000..060f9ca --- a/dev/null +++ b/noncore/apps/oxygen/oxyframe.cpp | |||
@@ -0,0 +1,16 @@ | |||
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 | #include "oxygen.h" | ||
10 | |||
11 | #include <qpe/config.h> | ||
12 | #include "oxyframe.h" | ||
13 | |||
14 | OxyFrame::OxyFrame(QWidget *parent, const char *name) : QFrame(parent,name) | ||
15 | { | ||
16 | } | ||
diff --git a/noncore/apps/oxygen/oxyframe.h b/noncore/apps/oxygen/oxyframe.h new file mode 100644 index 0000000..01f888d --- a/dev/null +++ b/noncore/apps/oxygen/oxyframe.h | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | /*************************************************************************** | ||
3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | ||
5 | * it under the terms of the GNU General Public License as published by * | ||
6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * ( at your option ) any later version. * | ||
8 | * * | ||
9 | **************************************************************************/ | ||
10 | #ifndef _OXYFRAME_H | ||
11 | #define _OXYFRAME_H | ||
12 | |||
13 | |||
14 | #include <qframe.h> | ||
15 | |||
16 | class OxyFrame : public QFrame | ||
17 | { | ||
18 | Q_OBJECT | ||
19 | |||
20 | public: | ||
21 | OxyFrame( QWidget *parent=0, const char *name=0); | ||
22 | |||
23 | |||
24 | }; | ||
25 | |||
26 | #endif | ||
diff --git a/noncore/apps/oxygen/oxygen.pro b/noncore/apps/oxygen/oxygen.pro index c447330..8f9e4ea 100644 --- a/noncore/apps/oxygen/oxygen.pro +++ b/noncore/apps/oxygen/oxygen.pro | |||
@@ -1,26 +1,28 @@ | |||
1 | TEMPLATE= app | 1 | TEMPLATE= app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | HEADERS = oxygen.h \ | 3 | HEADERS = oxygen.h \ |
4 | kmolcalc.h \ | 4 | kmolcalc.h \ |
5 | kmolelements.h \ | 5 | kmolelements.h \ |
6 | calcdlgui.h \ | 6 | calcdlgui.h \ |
7 | dataTable.h \ | 7 | dataTable.h \ |
8 | psewidget.h \ | 8 | psewidget.h \ |
9 | oxyframe.h \ | ||
9 | datawidgetui.h | 10 | datawidgetui.h |
10 | 11 | ||
11 | SOURCES = main.cpp \ | 12 | SOURCES = main.cpp \ |
12 | oxygen.cpp \ | 13 | oxygen.cpp \ |
13 | kmolcalc.cpp \ | 14 | kmolcalc.cpp \ |
14 | calcdlgui.cpp \ | 15 | calcdlgui.cpp \ |
15 | kmolelements.cpp \ | 16 | kmolelements.cpp \ |
16 | dataTable.cpp \ | 17 | dataTable.cpp \ |
17 | psewidget.cpp \ | 18 | psewidget.cpp \ |
19 | oxyframe.cpp \ | ||
18 | datawidgetui.cpp | 20 | datawidgetui.cpp |
19 | INCLUDEPATH += $(OPIEDIR)/include | 21 | INCLUDEPATH += $(OPIEDIR)/include |
20 | DEPENDPATH += $(OPIEDIR)/include | 22 | DEPENDPATH += $(OPIEDIR)/include |
21 | LIBS += -lqpe | 23 | LIBS += -lqpe |
22 | INTERFACES= calcdlg.ui | 24 | INTERFACES= calcdlg.ui |
23 | TARGET = oxygen | 25 | TARGET = oxygen |
24 | DESTDIR = $(OPIEDIR)/bin | 26 | DESTDIR = $(OPIEDIR)/bin |
25 | 27 | ||
26 | TRANSLATIONS = ../../../i18n/de/oxygen.ts | 28 | TRANSLATIONS = ../../../i18n/de/oxygen.ts |
diff --git a/noncore/apps/oxygen/psewidget.cpp b/noncore/apps/oxygen/psewidget.cpp index 66450be..f48cebe 100644 --- a/noncore/apps/oxygen/psewidget.cpp +++ b/noncore/apps/oxygen/psewidget.cpp | |||
@@ -1,16 +1,19 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * * | 2 | * * |
3 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 5 | * the Free Software Foundation; either version 2 of the License, or * |
6 | * ( at your option ) any later version. * | 6 | * ( at your option ) any later version. * |
7 | * * | 7 | * * |
8 | **************************************************************************/ | 8 | **************************************************************************/ |
9 | #include "oxygen.h" | ||
10 | 9 | ||
11 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | #include <qlayout.h> | ||
12 | #include "psewidget.h" | 12 | #include "psewidget.h" |
13 | #include "oxyframe.h" | ||
13 | 14 | ||
14 | PSEWidget::PSEWidget() : QWidget() | 15 | PSEWidget::PSEWidget() : QWidget() |
15 | { | 16 | { |
17 | maingrid = new QGridLayout( 18 , 10 , -1 , "maingridlayout" ); | ||
18 | OxyFrame *test = new OxyFrame(this); | ||
16 | } | 19 | } |
diff --git a/noncore/apps/oxygen/psewidget.h b/noncore/apps/oxygen/psewidget.h index ebdec94..a0ab701 100644 --- a/noncore/apps/oxygen/psewidget.h +++ b/noncore/apps/oxygen/psewidget.h | |||
@@ -3,27 +3,27 @@ | |||
3 | * * | 3 | * * |
4 | * This program is free software; you can redistribute it and/or modify * | 4 | * This program is free software; you can redistribute it and/or modify * |
5 | * it under the terms of the GNU General Public License as published by * | 5 | * it under the terms of the GNU General Public License as published by * |
6 | * the Free Software Foundation; either version 2 of the License, or * | 6 | * the Free Software Foundation; either version 2 of the License, or * |
7 | * ( at your option ) any later version. * | 7 | * ( at your option ) any later version. * |
8 | * * | 8 | * * |
9 | **************************************************************************/ | 9 | **************************************************************************/ |
10 | #ifndef _PSEWIDGET_H | 10 | #ifndef _PSEWIDGET_H |
11 | #define _PSEWIDGET_H | 11 | #define _PSEWIDGET_H |
12 | 12 | ||
13 | #include <qwidget.h> | 13 | #include <qwidget.h> |
14 | 14 | ||
15 | class QTable; | 15 | class QGridLayout; |
16 | class QComboBox; | ||
17 | class QLabel; | ||
18 | |||
19 | 16 | ||
20 | class PSEWidget : public QWidget | 17 | class PSEWidget : public QWidget |
21 | { | 18 | { |
22 | Q_OBJECT | 19 | Q_OBJECT |
23 | 20 | ||
24 | public: | 21 | public: |
25 | PSEWidget(); | 22 | PSEWidget(); |
26 | 23 | ||
24 | private: | ||
25 | QGridLayout *maingrid; | ||
26 | |||
27 | }; | 27 | }; |
28 | 28 | ||
29 | #endif | 29 | #endif |