casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PreferencesFunction.qo.h
Go to the documentation of this file.
1 #ifndef PREFERENCESFUNCTION_QO_H
2 #define PREFERENCESFUNCTION_QO_H
3 
4 #include <QWidget>
5 #include <QSettings>
6 #include <guitools/Feather/PreferencesFunction.ui.h>
8 
9 namespace casa {
10 
16 class PreferencesFunction : public QWidget
17 {
18  Q_OBJECT
19 
20 public:
21  PreferencesFunction(int index, QWidget *parent = 0);
23 
24  //Initialization of the default color
25  void setColor( QColor color );
26  void setDisplayed( bool visible );
27  void setScatterEligible( bool eligible );
28  void setDisplayHidden();
29  void setName( const QString& name );
30 
31 
32  //Getters
37  bool isDisplayed() const;
42  bool isDisplayedGUI() const;
46  bool isScatterEligible() const;
47  QString getName() const;
48 
49  //Initializes the defaults from user settings.
50  void initialize( QSettings& settings);
51 
52  //Writes what is currently displayed into the user settings.
53  void persist( QSettings& settings );
54 
55  //Copies the defaults into what is displayed.
56  void reset();
57 
59 
60 signals:
61  void displayStatusChanged();
62 
63 private slots:
64  void visibilityChanged();
65  void showColorDialog();
66 private:
67  int id;
70  QString getBaseStorageId() const;
71  void setButtonColor( QColor color );
72  const QString COLOR_KEY;
73  const QString VISIBILITY_KEY;
74  QColor getButtonColor() const;
75  static const QString FUNCTION_COLOR;
76  Ui::PreferencesFunctionClass ui;
77 };
78 
79 }
80 
81 #endif // PREFERENCESFUNCTION_QO_H
const CurveDisplay getFunctionPreferences() const
void persist(QSettings &settings)
Writes what is currently displayed into the user settings.
bool isScatterEligible() const
Can this curve be included in the scatter plot.
void setButtonColor(QColor color)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
QString getName() const
QColor getButtonColor() const
void initialize(QSettings &settings)
Initializes the defaults from user settings.
Contains display information about a specific curve in the plot such as color, name, and whether it should be shown.
Definition: CurveDisplay.h:38
void setDisplayed(bool visible)
void reset()
Copies the defaults into what is displayed.
void setName(const QString &name)
static const QString FUNCTION_COLOR
bool isDisplayed() const
Getters.
void setScatterEligible(bool eligible)
Ui::PreferencesFunctionClass ui
PreferencesFunction(int index, QWidget *parent=0)
Displays, handles persistence, and stores display properties for a particular curve that can be shown...
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the color(i.e.,"000000"for black) and
QString getBaseStorageId() const
bool isDisplayedGUI() const
Displayed in the GUI.
void setColor(QColor color)
Initialization of the default color.