QtAnnotatorGui.qo.h

Go to the documentation of this file.
00001 //# Copyright (C) 2005
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 
00026 #ifndef QTANNOTATORGUIQO_H
00027 #define QTANNOTATORGUIQO_H
00028 
00029 #include <casa/aips.h>
00030 #include <display/QtAutoGui/QtAutoGui.qo.h>
00031 #include <display/QtViewer/QtDisplayPanel.qo.h>
00032 #include <display/DisplayShapes/Annotations.h>
00033 #include <casa/Containers/Record.h>
00034 
00035 
00036 #include <graphics/X11/X_enter.h>
00037 #  include <QDir>
00038 #  include <QColor>
00039 #  include <QHash>
00040 #include <QWidget>
00041 #include <QMouseEvent>
00042 #include <display/QtViewer/QtAnnotatorGui.ui.h>
00043 #include <graphics/X11/X_exit.h>
00044 
00045 
00046 
00047 namespace casa {
00048 
00049         class QtViewer;
00050         class QtMarkerGui;
00051 
00052 // <summary>
00053 // Annotating widget for a display panel.
00054 // </summary>
00055 
00056 // <synopsis>
00057 // </synopsis>
00058 
00059 
00060         class QtAnnotatorGui: public QWidget, private Ui::Annotating {
00061                 Q_OBJECT
00062         public:
00063                 QtAnnotatorGui(QtDisplayPanel *parent = 0) ;
00064                 ~QtAnnotatorGui();
00065 
00066                 static const QString toolshorthands[12];
00067                 static const QString basebitmaps[12];
00068                 static const QString markerbitmaps[14];
00069                 static const QString helptext[12];
00070                 static const QString canvastype[3];
00071 
00072                 static const int dlkeys[4];
00073 
00074         private:
00075                 QButtonGroup *bGroup;
00076                 QButtonGroup *mGroup;
00077 
00078                 void setup();
00079                 QToolButton *button[12];
00080                 QToolButton *marker[14];
00081                 int activeTool;
00082                 int activeMarker;
00083                 int activeKey;
00084                 QString canvasType;
00085 
00086                 QtMarkerGui *gridLayout2;
00087                 bool moveMarker;
00088                 QtDisplayPanel* pDP;
00089                 Annotations* annot;
00090 
00091         private slots:
00092                 void mouseReleaseEvent(QMouseEvent *event);
00093                 void buttonClicked(QAbstractButton* button);
00094                 void markerClicked(QAbstractButton* button);
00095                 void buttonClicked(int button);
00096                 void canvasLockChanged(const QString &text);
00097                 void canvasLockChanged(int idx);
00098 
00099         public:
00100                 void markerReleased(QMouseEvent *event);
00101                 QButtonGroup* mgroup();
00102 
00103         public slots:
00104                 void confirmToolKitChange(const QString, const Qt::MouseButton, const bool);
00105         signals:
00106                 void toolKitChange(const QString, const Qt::MouseButton, const bool);
00107                 void setMarker(const QString);
00108                 // Display::K_Pointer_Button1,  -- LeftButton  -- 1
00109                 // Display::K_Pointer_Button2,  -- MidButton  -- 2
00110                 // Display::K_Pointer_Button3;  -- RightButton  -- 3
00111         };
00112 
00113         class QtMarkerGui: public QWidget {
00114                 Q_OBJECT
00115         public:
00116                 QtMarkerGui(QtAnnotatorGui *parent = 0, Qt::WFlags f = Qt::Popup) ;
00117                 ~QtMarkerGui() ;
00118                 virtual void mouseReleaseEvent ( QMouseEvent * event );
00119         private:
00120                 QtAnnotatorGui* parent;
00121 
00122         };
00123 
00124 }
00125 
00126 #endif
00127 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1