casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CursorTrackingHolder.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2013
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef QTVIEWER_CURSORTRACKINGHOLDER_H_
26 #define QTVIEWER_CURSORTRACKINGHOLDER_H_
27 
28 #include <QWidget>
30 #include <display/QtViewer/CursorTrackingHolder.ui.h>
31 #include <vector>
32 
33 namespace casacore{
34 
35  class Record;
36 }
37 
38 namespace casa {
39 
40  class QtDisplayPanelGui;
41  class QtDisplayData;
42  class PrincipalAxesDD;
43  class TrackBox;
44 
48  class CursorTrackingHolder : public InActiveDock, protected Ui::CursorTrackingHolder {
49  Q_OBJECT
50 
51  public:
52  CursorTrackingHolder( QtDisplayPanelGui *panel, QWidget *parent = 0);
54 
55  void arrangeTrackBoxes( );
56  TrackBox *addTrackBox( QtDisplayData *, int position = -1 );
57  void removeTrackBox( QtDisplayData * );
58  void display( const casacore::Record &trackingRec );
59  void cursorUpdate( const std::vector<double> &, QtDisplayData * );
60 
61  QSize sizeHint( ) const { return find_size( ); }
62  QSize minimumSizeHint( ) const { return find_size( ); }
63 
64  void dismiss( );
65 
66  //Overriden because if the cursor tracker was not shown, images were loaded,
67  //and then the cursor tracker was shown, it was not resizing properly.
68  void setVisible( bool visible );
69 
70  protected:
71  void closeEvent ( QCloseEvent * event );
72 
73  private slots:
74  void handle_folding( bool, QtDisplayData * );
75  void handle_visibility(bool);
76 
77  private:
78  QSize find_size( ) const;
79  void update_size( );
81 
82  bool dismissed;
83  };
84 }
85 #endif
void closeEvent(QCloseEvent *event)
TrackBox * addTrackBox(QtDisplayData *, int position=-1)
Dock widget which manages the cursor tracking dialogs...
CursorTrackingHolder(QtDisplayPanelGui *panel, QWidget *parent=0)
void cursorUpdate(const std::vector< double > &, QtDisplayData *)
void handle_folding(bool, QtDisplayData *)
void display(const casacore::Record &trackingRec)
The main display window for the Qt version of the viewer.
A hierarchical collection of named fields of various types.
Definition: Record.h:180
Helper class for QtDisplayPanelGui, for display of tracking information.
Definition: TrackBox.qo.h:52
void removeTrackBox(QtDisplayData *)
void setVisible(bool visible)
Overriden because if the cursor tracker was not shown, images were loaded, and then the cursor tracke...
Allows the dock widget z-position to be behind the main window instead of the default behavior of alw...
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42