casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtPanelBase.qo.h
Go to the documentation of this file.
1 //# QtPanelBase.qo.h: base class for independent (main window) panels whether plotter or viewer
2 //# with surrounding Gui functionality
3 //# Copyright (C) 2009
4 //# Associated Universities, Inc. Washington DC, USA.
5 //#
6 //# This library is free software; you can redistribute it and/or modify it
7 //# under the terms of the GNU Library General Public License as published by
8 //# the Free Software Foundation; either version 2 of the License, or (at your
9 //# option) any later version.
10 //#
11 //# This library is distributed in the hope that it will be useful, but WITHOUT
12 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14 //# License for more details.
15 //#
16 //# You should have received a copy of the GNU Library General Public License
17 //# along with this library; if not, write to the Free Software Foundation,
18 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
19 //#
20 //# Correspondence concerning AIPS++ should be addressed as follows:
21 //# Internet email: aips2-request@nrao.edu.
22 //# Postal address: AIPS++ Project Office
23 //# National Radio Astronomy Observatory
24 //# 520 Edgemont Road
25 //# Charlottesville, VA 22903-2475 USA
26 //#
27 //# $Id: QtPanelBase.qo.h,v 1.7 2006/10/10 21:42:05 dking Exp $
28 
29 #ifndef QTPANELBASE_H_
30 #define QTPANELBASE_H_
31 
32 #include <QMainWindow>
33 
34 namespace casa {
35 
36  class QtPanelBase : public QMainWindow {
37  Q_OBJECT
38 
39  public:
40  QtPanelBase( QWidget *parent=0 ) : QMainWindow(parent), close_override(false) { }
41 
42  // Used to close this panel (i.e. QMainWindow)... This function
43  // should be used instead of close() to programmatically close
44  // the window, i.e. cause it to no longer be valid.
45  virtual void closeMainPanel( );
46 
47  // Used to indicate that "closing" the window should be reinterpreted
48  // as "hiding" the window, i.e. QtDBusViewerAdaptor is done with the
49  // window so when the user closes it it should go away.
50  virtual void releaseMainPanel( );
51 
52  protected:
53  bool isOverridedClose( ) const { return close_override; }
54 
55  private:
57  };
58 }
59 
60 #endif
virtual void releaseMainPanel()
Used to indicate that &quot;closing&quot; the window should be reinterpreted as &quot;hiding&quot; the window...
virtual void closeMainPanel()
Used to close this panel (i.e.
QtPanelBase(QWidget *parent=0)
bool isOverridedClose() const