TBOptions.qo.h

Go to the documentation of this file.
00001 //# TBOptions.qo.h: Widget to edit the browsing options.
00002 //# Copyright (C) 2005
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: $
00027 #ifndef TBOPTIONS_H_
00028 #define TBOPTIONS_H_
00029 
00030 #include <casaqt/QtBrowser/TBOptions.ui.h>
00031 
00032 #include <QtGui>
00033 
00034 #include <casa/BasicSL/String.h>
00035 
00036 namespace casa {
00037 
00038 // <summary>
00039 // Widget to edit the browsing options.
00040 // </summary>
00041 //
00042 // <synopsis>
00043 // TBOptions is used to display and edit any current browsing options.
00044 // Currently, the only available options are: save current view on save, and
00045 // setting the debug threshold.  Important: the parent/caller is responsible
00046 // for connecting the saveOptions() signal and actually setting the options as
00047 // requested.
00048 // </synopsis>
00049 
00050 class TBOptions : public QDialog, Ui::Options {
00051     Q_OBJECT
00052 
00053 public:
00054     // Default Constructor.
00055     TBOptions();
00056 
00057     ~TBOptions();
00058 
00059     
00060     // Returns true if the "save view on close" check box is checked, false
00061     // otherwise.
00062     bool saveView();
00063 
00064     // Sets the state on the "save view on close" check box.
00065     void setSaveView(bool saveView);
00066 
00067     // Returns the debug threshold as indicated by the QComboBox.
00068     int debugLevel();
00069 
00070     // Sets the debug threshold via the QComboBox.
00071     void setDebugLevel(int newLevel);
00072     
00073     // Gets/Sets the file chooser history limit.
00074     // <group>
00075     int chooserHistoryLimit() const;
00076     void setChooserHistoryLimit(int limit);
00077     // </group>
00078     
00079 signals:
00080     // saveOptions is emitted when the user has configured the options and
00081     // clicked the "Save" button.  A pointer to this TBOptions object is
00082     // included as the parent/caller should delete it.
00083     void saveOptions(TBOptions* opt);
00084 
00085 private slots:
00086     // Restores the default options to the dialog.
00087     void restoreDefaults();
00088 
00089     // Slot for the "Save" button.  Emits the saveOptions() signal.
00090     void save();
00091 
00092     // Slot for the "Cancel" button.  Closes and deletes the widget.
00093     void cancel();
00094 };
00095 
00096 }
00097 
00098 #endif /* TBOPTIONS_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1