OpendTect  6.6
uicolor.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Lammertink
8  Date: 22/05/2000
9  RCS: $Id$
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "uibasemod.h"
15 #include "color.h"
16 #include "uigroup.h"
17 
18 class uiLabel;
19 class uiPushButton;
20 class uiCheckBox;
21 class uiComboBox;
22 class uiSpinBox;
23 
24 
28 mGlobal(uiBase) bool selectColor(Color&,uiParent* parnt=0,
30  bool withtransp=false);
31 
32 // To be used by cmddriver to select a color while closing the QColorDialog
33 mGlobal(uiBase) void setExternalColor( const Color& );
34 
35 
43 mExpClass(uiBase) uiColorInput : public uiGroup
45 public:
46  mExpClass(uiBase) Setup
47  {
48  public:
49 
50  enum TranspHndlng { None, InSelector, Separate };
51 
52  Setup( const Color& col, TranspHndlng h=None )
53  : color_(col)
54  , withcheck_(false)
55  , dlgtitle_( uiColorInput::sSelColor() )
56  , transp_(h)
57  , withdesc_(h != Separate)
58  {}
59 
60  mDefSetupMemb(Color,color)
61  mDefSetupMemb(uiString,lbltxt)
62  mDefSetupMemb(bool,withcheck)
63  mDefSetupMemb(uiString,dlgtitle)
64  mDefSetupMemb(TranspHndlng,transp)
65  mDefSetupMemb(bool,withdesc)
66 
67  };
68 
70  const char* nm=0);
71 
72  const Color& color() const { return color_; }
73  void setColor(const Color&);
74  bool doDraw() const;
75  void setDoDraw(bool);
76  void setLblText(const uiString&);
77 
80 
81  uiPushButton* getButton() { return colbut_; }
82  uiComboBox* getDescCombo() { return descfld_; }
83 
84  static uiString sSelColor();
85  static bool selectColor(Color& col,uiParent*,
86  uiString,bool withtransp);
87 
88 private:
89 
95 
99 
104 };
105 
uiColorInput::colbut_
uiPushButton * colbut_
Definition: uicolor.h:90
uiColorInput::descfld_
uiComboBox * descfld_
Definition: uicolor.h:93
uiColorInput::getDescCombo
uiComboBox * getDescCombo()
Definition: uicolor.h:82
uiColorInput::transpfld_
uiSpinBox * transpfld_
Definition: uicolor.h:92
mGlobal
#define mGlobal(module)
Definition: commondefs.h:180
uiColorInput::getButton
uiPushButton * getButton()
Definition: uicolor.h:81
uiColorInput::colorChanged
Notifier< uiColorInput > colorChanged
Definition: uicolor.h:78
setExternalColor
void setExternalColor(const Color &)
uiComboBox
Combo box.
Definition: uicombobox.h:32
uiColorInput::selCol
void selCol(CallBacker *)
uiColorInput::color_
Color color_
Definition: uicolor.h:96
uiColorInput::transpChg
void transpChg(CallBacker *)
mExpClass
#define mExpClass(module)
Definition: commondefs.h:177
uiCheckBox
Definition: uibutton.h:167
mDefSetupMemb
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:154
CallBacker
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
sKey::Setup
FixedString Setup()
Definition: keystrs.h:139
mODTextTranslationClass
#define mODTextTranslationClass(clss)
Definition: uistring.h:40
uiColorInput::doDraw
bool doDraw() const
uiColorInput::setLblText
void setLblText(const uiString &)
uigroup.h
uiColorInput::lbl_
uiLabel * lbl_
Definition: uicolor.h:94
selectColor
bool selectColor(Color &, uiParent *parnt=0, uiString=uiString::emptyString(), bool withtransp=false)
pops a selector box to select a new color
uiColorInput::dlgtxt_
uiString dlgtxt_
Definition: uicolor.h:97
uiColorInput::setColor
void setColor(const Color &)
uiGroup
Definition: uigroup.h:54
uiColorInput::color
const Color & color() const
Definition: uicolor.h:72
Setup
Definition: ceemdalgo.h:161
Notifier< uiColorInput >
uiColorInput::dodrawSel
void dodrawSel(CallBacker *)
uiSpinBox
Definition: uispinbox.h:24
Network::None
@ None
Definition: networkcommon.h:33
uiColorInput
small element for color selection. Has no text label.
Definition: uicolor.h:44
uiColorInput::doDrawChanged
Notifier< uiColorInput > doDrawChanged
Definition: uicolor.h:79
uiString
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
uiString::emptyString
static const uiString & emptyString()
Definition: uistring.h:300
uiColorInput::selwithtransp_
bool selwithtransp_
Definition: uicolor.h:98
uiLabel
Definition: uilabel.h:24
uiColorInput::uiColorInput
mODTextTranslationClass(uiColorInput) public uiColorInput(uiParent *, const Setup &, const char *nm=0)
color.h
uiColorInput::descSel
void descSel(CallBacker *)
uiParent
Definition: uiparent.h:26
uiColorInput::setDoDraw
void setDoDraw(bool)
uiColorInput::selectColor
static bool selectColor(Color &col, uiParent *, uiString, bool withtransp)
Color
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
uiColorInput::sSelColor
static uiString sSelColor()
uiPushButton
is the base class for all buttons.
Definition: uibutton.h:88
uiColorInput::dodrawbox_
uiCheckBox * dodrawbox_
Definition: uicolor.h:91

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021