casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtAnnotatorGui.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
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 
26 #ifndef QTANNOTATORGUIQO_H
27 #define QTANNOTATORGUIQO_H
28 
29 #include <casa/aips.h>
33 #include <casa/Containers/Record.h>
34 
35 
36 #include <graphics/X11/X_enter.h>
37 # include <QDir>
38 # include <QColor>
39 # include <QHash>
40 #include <QWidget>
41 #include <QMouseEvent>
42 #include <display/QtViewer/QtAnnotatorGui.ui.h>
43 #include <graphics/X11/X_exit.h>
44 
45 
46 
47 namespace casa {
48 
49  class QtViewer;
50  class QtMarkerGui;
51 
52 // <summary>
53 // Annotating widget for a display panel.
54 // </summary>
55 
56 // <synopsis>
57 // </synopsis>
58 
59 
60  class QtAnnotatorGui: public QWidget, private Ui::Annotating {
61  Q_OBJECT
62  public:
63  QtAnnotatorGui(QtDisplayPanel *parent = 0) ;
65 
66  static const QString toolshorthands[12];
67  static const QString basebitmaps[12];
68  static const QString markerbitmaps[14];
69  static const QString helptext[12];
70  static const QString canvastype[3];
71 
72  static const int dlkeys[4];
73 
74  private:
75  QButtonGroup *bGroup;
76  QButtonGroup *mGroup;
77 
78  void setup();
79  QToolButton *button[12];
80  QToolButton *marker[14];
83  int activeKey;
84  QString canvasType;
85 
87  bool moveMarker;
90 
91  private slots:
92  void mouseReleaseEvent(QMouseEvent *event);
93  void buttonClicked(QAbstractButton* button);
94  void markerClicked(QAbstractButton* button);
95  void buttonClicked(int button);
96  void canvasLockChanged(const QString &text);
97  void canvasLockChanged(int idx);
98 
99  public:
100  void markerReleased(QMouseEvent *event);
101  QButtonGroup* mgroup();
102 
103  public slots:
104  void confirmToolKitChange(const QString, const Qt::MouseButton, const bool);
105  signals:
106  void toolKitChange(const QString, const Qt::MouseButton, const bool);
107  void setMarker(const QString);
108  // Display::K_Pointer_Button1, -- LeftButton -- 1
109  // Display::K_Pointer_Button2, -- MidButton -- 2
110  // Display::K_Pointer_Button3; -- RightButton -- 3
111  };
112 
113  class QtMarkerGui: public QWidget {
114  Q_OBJECT
115  public:
116  QtMarkerGui(QtAnnotatorGui *parent = 0, Qt::WFlags f = Qt::Popup) ;
117  ~QtMarkerGui() ;
118  virtual void mouseReleaseEvent ( QMouseEvent * event );
119  private:
121 
122  };
123 
124 }
125 
126 #endif
127 
QButtonGroup * mgroup()
void buttonClicked(QAbstractButton *button)
static const QString toolshorthands[12]
QToolButton * marker[14]
QToolButton * button[12]
void mouseReleaseEvent(QMouseEvent *event)
QtDisplayPanel * pDP
Control class for a collection of DisplayShapeInterfaces.
Definition: Annotations.h:84
void markerClicked(QAbstractButton *button)
QtAnnotatorGui * parent
QtMarkerGui(QtAnnotatorGui *parent=0, Qt::WFlags f=Qt::Popup)
Annotating widget for a display panel.
void toolKitChange(const QString, const Qt::MouseButton, const bool)
virtual void mouseReleaseEvent(QMouseEvent *event)
static const QString canvastype[3]
QtAnnotatorGui(QtDisplayPanel *parent=0)
void canvasLockChanged(const QString &text)
void confirmToolKitChange(const QString, const Qt::MouseButton, const bool)
QtMarkerGui * gridLayout2
void markerReleased(QMouseEvent *event)
void setMarker(const QString)
static const QString markerbitmaps[14]
static const QString helptext[12]
static const QString basebitmaps[12]
static const int dlkeys[4]