casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TBOptions.qo.h
Go to the documentation of this file.
1 //# TBOptions.qo.h: Widget to edit the browsing options.
2 //# Copyright (C) 2005
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef TBOPTIONS_H_
28 #define TBOPTIONS_H_
29 
30 #include <casaqt/QtBrowser/TBOptions.ui.h>
31 
32 #include <QtGui>
33 
34 #include <casa/BasicSL/String.h>
35 
36 namespace casa {
37 
38 // <summary>
39 // Widget to edit the browsing options.
40 // </summary>
41 //
42 // <synopsis>
43 // TBOptions is used to display and edit any current browsing options.
44 // Currently, the only available options are: save current view on save, and
45 // setting the debug threshold. Important: the parent/caller is responsible
46 // for connecting the saveOptions() signal and actually setting the options as
47 // requested.
48 // </synopsis>
49 
50 class TBOptions : public QDialog, Ui::Options {
51  Q_OBJECT
52 
53 public:
54  // Default Constructor.
55  TBOptions();
56 
57  ~TBOptions();
58 
59 
60  // Returns true if the "save view on close" check box is checked, false
61  // otherwise.
62  bool saveView();
63 
64  // Sets the state on the "save view on close" check box.
65  void setSaveView(bool saveView);
66 
67  // Returns the debug threshold as indicated by the QComboBox.
68  int debugLevel();
69 
70  // Sets the debug threshold via the QComboBox.
71  void setDebugLevel(int newLevel);
72 
73  // Gets/Sets the file chooser history limit.
74  // <group>
75  int chooserHistoryLimit() const;
76  void setChooserHistoryLimit(int limit);
77  // </group>
78 
79 signals:
80  // saveOptions is emitted when the user has configured the options and
81  // clicked the "Save" button. A pointer to this TBOptions object is
82  // included as the parent/caller should delete it.
83  void saveOptions(TBOptions* opt);
84 
85 private slots:
86  // Restores the default options to the dialog.
87  void restoreDefaults();
88 
89  // Slot for the "Save" button. Emits the saveOptions() signal.
90  void save();
91 
92  // Slot for the "Cancel" button. Closes and deletes the widget.
93  void cancel();
94 };
95 
96 }
97 
98 #endif /* TBOPTIONS_H_ */
void setDebugLevel(int newLevel)
Sets the debug threshold via the QComboBox.
Widget to edit the browsing options.
Definition: TBOptions.qo.h:50
bool saveView()
Returns true if the &quot;save view on close&quot; check box is checked, false otherwise.
void cancel()
Slot for the &quot;Cancel&quot; button.
int chooserHistoryLimit() const
Gets/Sets the file chooser history limit.
void setSaveView(bool saveView)
Sets the state on the &quot;save view on close&quot; check box.
TBOptions()
Default Constructor.
void setChooserHistoryLimit(int limit)
void save()
Slot for the &quot;Save&quot; button.
int debugLevel()
Returns the debug threshold as indicated by the QComboBox.
void saveOptions(TBOptions *opt)
saveOptions is emitted when the user has configured the options and clicked the &quot;Save&quot; button...
void restoreDefaults()
Restores the default options to the dialog.