summaryrefslogtreecommitdiff
path: root/noncore/apps/oxygen
authorcniehaus <cniehaus>2002-09-17 21:57:22 (UTC)
committer cniehaus <cniehaus>2002-09-17 21:57:22 (UTC)
commit01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0 (patch) (unidiff)
tree7a4df143ed5acaedf41eb5b4399117fdaf18bb38 /noncore/apps/oxygen
parentd09947cc7ead59747feb10679ba6ba0a9db20a74 (diff)
downloadopie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.zip
opie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.tar.gz
opie-01d31aeaa8d513bde8237a07ea0a48ac1b85c3c0.tar.bz2
added the future super-nice-and-cool-widget oxyframe and removed some
obsolte #include<>
Diffstat (limited to 'noncore/apps/oxygen') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/oxygen/dataTable.cpp5
-rw-r--r--noncore/apps/oxygen/dataTable.h2
-rw-r--r--noncore/apps/oxygen/oxyframe.cpp16
-rw-r--r--noncore/apps/oxygen/oxyframe.h26
-rw-r--r--noncore/apps/oxygen/oxygen.pro2
-rw-r--r--noncore/apps/oxygen/psewidget.cpp5
-rw-r--r--noncore/apps/oxygen/psewidget.h8
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
@@ -3,31 +3,26 @@
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
14OxydataTable::OxydataTable(int numRows, int numCols, QWidget *parent, 12OxydataTable::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
19void OxydataTable::paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected) 17void 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 ) );
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
@@ -8,21 +8,19 @@
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
17class OxydataTable : public QTable 16class 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
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
14OxyFrame::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
16class 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
@@ -3,21 +3,23 @@ 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
19INCLUDEPATH += $(OPIEDIR)/include 21INCLUDEPATH += $(OPIEDIR)/include
20DEPENDPATH += $(OPIEDIR)/include 22DEPENDPATH += $(OPIEDIR)/include
21 LIBS += -lqpe 23 LIBS += -lqpe
22 INTERFACES= calcdlg.ui 24 INTERFACES= calcdlg.ui
23 TARGET = oxygen 25 TARGET = oxygen
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
@@ -3,14 +3,17 @@
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
14PSEWidget::PSEWidget() : QWidget() 15PSEWidget::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
@@ -9,21 +9,21 @@
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
15class QTable; 15class QGridLayout;
16class QComboBox;
17class QLabel;
18
19 16
20class PSEWidget : public QWidget 17class 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