summaryrefslogtreecommitdiff
path: root/libqtaux
Unidiff
Diffstat (limited to 'libqtaux') (more/less context) (ignore whitespace changes)
-rw-r--r--libqtaux/qcolordialog.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libqtaux/qcolordialog.cpp b/libqtaux/qcolordialog.cpp
index 907c2aa..ccef0ad 100644
--- a/libqtaux/qcolordialog.cpp
+++ b/libqtaux/qcolordialog.cpp
@@ -1,150 +1,154 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2** $Id$
3** 3**
4** Implementation of QColorDialog class 4** Implementation of QColorDialog class
5** 5**
6** Created : 990222 6** Created : 990222
7** 7**
8** Copyright (C) 1999-2000 Trolltech AS. All rights reserved. 8** Copyright (C) 1999-2000 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the dialogs module of the Qt GUI Toolkit. 10** This file is part of the dialogs module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38#include "qcolordialog.h" 38#include "qcolordialog.h"
39 39
40#include "qpainter.h" 40#include "qpainter.h"
41#include "qlayout.h" 41#include "qlayout.h"
42#include "qlabel.h" 42#include "qlabel.h"
43#include "qpushbutton.h" 43#include "qpushbutton.h"
44#include "qlineedit.h" 44#include "qlineedit.h"
45#include "qimage.h" 45#include "qimage.h"
46#include "qpixmap.h" 46#include "qpixmap.h"
47#include "qdrawutil.h" 47#include "qdrawutil.h"
48#include "qvalidator.h" 48#include "qvalidator.h"
49#include "qapplication.h" 49#include "qapplication.h"
50 50
51//////////// QWellArray BEGIN 51//////////// QWellArray BEGIN
52 52
53#include "qobjectdict.h" 53#include "qobjectdict.h"
54 54
55#ifndef QT_NO_DRAGANDDROP
56#include "qdragobject.h"
57#endif
58
55// 59//
56// W A R N I N G 60// W A R N I N G
57// ------------- 61// -------------
58// 62//
59// This file is not part of the Qt API. It exists for the convenience 63// This file is not part of the Qt API. It exists for the convenience
60// of qwellarray.cpp and qcolordialog.cpp. 64// of qwellarray.cpp and qcolordialog.cpp.
61// This header file may change from version to version without notice, 65// This header file may change from version to version without notice,
62// or even be removed. 66// or even be removed.
63// 67//
64// 68//
65 69
66 70
67#include "qtableview.h" 71#include "qtableview.h"
68 72
69 73
70struct QWellArrayData; 74struct QWellArrayData;
71 75
72class QWellArray : public QTableView 76class QWellArray : public QTableView
73{ 77{
74 Q_OBJECT 78 Q_OBJECT
75 Q_PROPERTY( int numCols READ numCols ) 79 Q_PROPERTY( int numCols READ numCols )
76 Q_PROPERTY( int numRows READ numRows ) 80 Q_PROPERTY( int numRows READ numRows )
77 Q_PROPERTY( int selectedColumn READ selectedColumn ) 81 Q_PROPERTY( int selectedColumn READ selectedColumn )
78 Q_PROPERTY( int selectedRow READ selectedRow ) 82 Q_PROPERTY( int selectedRow READ selectedRow )
79 83
80public: 84public:
81 QWellArray( QWidget *parent=0, const char *name=0, bool popup = FALSE ); 85 QWellArray( QWidget *parent=0, const char *name=0, bool popup = FALSE );
82 86
83 ~QWellArray() {} 87 ~QWellArray() {}
84 QString cellContent( int row, int col ) const; 88 QString cellContent( int row, int col ) const;
85 // ### Paul !!! virtual void setCellContent( int row, int col, const QString &); 89 // ### Paul !!! virtual void setCellContent( int row, int col, const QString &);
86 90
87 // ##### Obsolete since not const 91 // ##### Obsolete since not const
88 int numCols() { return nCols; } 92 int numCols() { return nCols; }
89 int numRows() { return nRows; } 93 int numRows() { return nRows; }
90 94
91 int numCols() const { return nCols; } 95 int numCols() const { return nCols; }
92 int numRows() const { return nRows; } 96 int numRows() const { return nRows; }
93 97
94 // ##### Obsolete since not const 98 // ##### Obsolete since not const
95 int selectedColumn() { return selCol; } 99 int selectedColumn() { return selCol; }
96 int selectedRow() { return selRow; } 100 int selectedRow() { return selRow; }
97 101
98 int selectedColumn() const { return selCol; } 102 int selectedColumn() const { return selCol; }
99 int selectedRow() const { return selRow; } 103 int selectedRow() const { return selRow; }
100 104
101 virtual void setSelected( int row, int col ); 105 virtual void setSelected( int row, int col );
102 106
103 void setCellSize( int w, int h ) { setCellWidth(w);setCellHeight( h ); } 107 void setCellSize( int w, int h ) { setCellWidth(w);setCellHeight( h ); }
104 108
105 QSize sizeHint() const; 109 QSize sizeHint() const;
106 110
107 virtual void setDimension( int rows, int cols ); 111 virtual void setDimension( int rows, int cols );
108 virtual void setCellBrush( int row, int col, const QBrush & ); 112 virtual void setCellBrush( int row, int col, const QBrush & );
109 QBrush cellBrush( int row, int col ); 113 QBrush cellBrush( int row, int col );
110 114
111signals: 115signals:
112 void selected( int row, int col ); 116 void selected( int row, int col );
113 117
114protected: 118protected:
115 virtual void setCurrent( int row, int col ); 119 virtual void setCurrent( int row, int col );
116 120
117 virtual void drawContents( QPainter *, int row, int col, const QRect& ); 121 virtual void drawContents( QPainter *, int row, int col, const QRect& );
118 void drawContents( QPainter * ); 122 void drawContents( QPainter * );
119 123
120 void paintCell( QPainter*, int row, int col ); 124 void paintCell( QPainter*, int row, int col );
121 void mousePressEvent( QMouseEvent* ); 125 void mousePressEvent( QMouseEvent* );
122 void mouseReleaseEvent( QMouseEvent* ); 126 void mouseReleaseEvent( QMouseEvent* );
123 void mouseMoveEvent( QMouseEvent* ); 127 void mouseMoveEvent( QMouseEvent* );
124 void keyPressEvent( QKeyEvent* ); 128 void keyPressEvent( QKeyEvent* );
125 void focusInEvent( QFocusEvent* ); 129 void focusInEvent( QFocusEvent* );
126 void focusOutEvent( QFocusEvent* ); 130 void focusOutEvent( QFocusEvent* );
127 131
128private: 132private:
129 int curRow; 133 int curRow;
130 int curCol; 134 int curCol;
131 int selRow; 135 int selRow;
132 int selCol; 136 int selCol;
133 int nCols; 137 int nCols;
134 int nRows; 138 int nRows;
135 bool smallStyle; 139 bool smallStyle;
136 QWellArrayData *d; 140 QWellArrayData *d;
137 141
138 private:// Disabled copy constructor and operator= 142 private:// Disabled copy constructor and operator=
139#if defined(Q_DISABLE_COPY) 143#if defined(Q_DISABLE_COPY)
140 QWellArray( const QWellArray & ); 144 QWellArray( const QWellArray & );
141 QWellArray& operator=( const QWellArray & ); 145 QWellArray& operator=( const QWellArray & );
142#endif 146#endif
143}; 147};
144 148
145 149
146 150
147// non-interface ... 151// non-interface ...
148 152
149 153
150 154