summaryrefslogtreecommitdiff
path: root/noncore/settings/appearance2/editScheme.cpp
authordrw <drw>2002-12-16 00:26:32 (UTC)
committer drw <drw>2002-12-16 00:26:32 (UTC)
commite4057ee7fe74c83e2dc44f8b9870f65da60fc4fa (patch) (unidiff)
tree027cebbca343052e970c90e7eed3447e14b58e39 /noncore/settings/appearance2/editScheme.cpp
parenta6a23d1c30e395add577eec261ae728f8d783299 (diff)
downloadopie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.zip
opie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.tar.gz
opie-e4057ee7fe74c83e2dc44f8b9870f65da60fc4fa.tar.bz2
QWhatsThis added
Diffstat (limited to 'noncore/settings/appearance2/editScheme.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/appearance2/editScheme.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp
index eefeccc..7e5225f 100644
--- a/noncore/settings/appearance2/editScheme.cpp
+++ b/noncore/settings/appearance2/editScheme.cpp
@@ -7,62 +7,65 @@
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_,   >  .   <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.--   : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i,     .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10 - .   .-<_>     .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11     ._= =}       : or (at your option) any later version.
12    .%`+i>       _;_. 12    .%`+i>       _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13    .i_,=:_.      -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15    : ..    .:,     . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.=       =       ; Public License for more details.
19++=   -.     .`     .: 19++=   -.     .`     .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20 :     =  ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21 -.   .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22  -_. . .   )=.  = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23    --        :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "editScheme.h" 29#include "editScheme.h"
30 30
31#include <opie/ocolorbutton.h> 31#include <opie/ocolorbutton.h>
32 32
33#include <qaction.h> 33#include <qaction.h>
34#include <qlabel.h> 34#include <qlabel.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qpopupmenu.h> 36#include <qpopupmenu.h>
37#include <qscrollview.h> 37#include <qscrollview.h>
38#include <qtoolbutton.h> 38#include <qtoolbutton.h>
39#include <qwhatsthis.h>
39 40
40EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags fl ) 41EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags )
41 : QDialog ( parent, name, modal, fl ) 42 : QDialog ( parent, name, modal, WStyle_ContextHelp )
42{ 43{
43 setCaption ( tr( "Edit scheme" ) ); 44 setCaption ( tr( "Edit scheme" ) );
44 QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); 45 QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 );
45 46
46 m_count = cnt; 47 m_count = cnt;
47 m_buttons = new OColorButton * [cnt]; 48 m_buttons = new OColorButton * [cnt];
48 m_colors = colors; 49 m_colors = colors;
49 50
50 for ( int i = 0; i < cnt; i++ ) 51 for ( int i = 0; i < cnt; i++ )
51 { 52 {
52 QLabel *l = new QLabel ( labels [i], this ); 53 QLabel *l = new QLabel ( labels [i], this );
53 layout-> addWidget ( l, i, 0 ); 54 layout-> addWidget ( l, i, 0 );
55 QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) );
54 56
55 m_buttons [i] = new OColorButton ( this, colors [i] ); 57 m_buttons [i] = new OColorButton ( this, colors [i] );
56 layout-> addWidget ( m_buttons [i], i, 1 ); 58 layout-> addWidget ( m_buttons [i], i, 1 );
59 QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) );
57 } 60 }
58} 61}
59 62
60EditScheme::~EditScheme ( ) 63EditScheme::~EditScheme ( )
61{ 64{
62 delete [] m_buttons; 65 delete [] m_buttons;
63} 66}
64 67
65void EditScheme::accept ( ) 68void EditScheme::accept ( )
66{ 69{
67 for ( int i = 0; i < m_count; i++ ) 70 for ( int i = 0; i < m_count; i++ )
68 m_colors [i] = m_buttons [i]-> color ( ); 71 m_colors [i] = m_buttons [i]-> color ( );