casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TBConnection.qo.h
Go to the documentation of this file.
1 //# TBConnection.qo.h: Dialog for opening/connecting to a table with options.
2 //# Copyright (C) 2005
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef TBCONNECTION_H_
28 #define TBCONNECTION_H_
29 
30 #include <casaqt/QtBrowser/TBConnection.ui.h>
31 
32 #include <QtGui>
33 #include <casa/BasicSL/String.h>
34 
35 namespace casa {
36 
37 //# Forward Declarations
38 class TBMain;
39 
40 // <summary>
41 // Dialog for opening/connecting to a table with options
42 // <summary>
43 //
44 // <synopsis>
45 // TBConnection is a dialog to open a table with user-specified options.
46 // <b>Important</b>: this is not currently supported, but in the future if a
47 // client/server architecture is used then this widget can be used for
48 // connecting to a remote table. Other options include the driver type: direct
49 // (using the casacore::Table module code for a local table) or XML. TBConnection
50 // displays helpful explanation text when the user clicks on the different
51 // options.
52 // </synopsis>
53 
54 class TBConnection : public QDialog, Ui::Connection {
55  Q_OBJECT
56 
57 public:
58  // Builds a connection dialog with the given TBMain. If parent is NULL,
59  // then the connection is displayed as a modal dialog; otherwise it is
60  // displayed in the parent.
61  TBConnection(TBMain* main, QWidget* parent = NULL);
62 
63  ~TBConnection();
64 
65 protected:
66  // Detects when one of the QLineEdit objects are clicked and calls the
67  // relevant clicked[Name]() slot.
68  bool eventFilter(QObject *obj, QEvent *event);
69 
70 private:
71  // Pointer to TBMain parent.
73 
74 private slots:
75  // Slot for when the user clicks the "accept" button. Checks for errors,
76  // and then opens the table with the specified options in the browser.
77  void accepted();
78 
79  // Slot for when the user clicks the "browse" button. Opens a filebrowser
80  // and sets the text of the line edit to the path of the selected file.
81  // Updates the help text to TBConstants::OPEN_TEXT_LOCATION.
82  void browse();
83 
84  // Slot for when the user clicks the local box. Updates the help text
85  // to TBConstants::OPEN_TEXT_LOCAL.
86  void clickedLocal();
87 
88  // Slot for when the user clicks the remote box. Updates the help text to
89  // TBConstants::OPEN_TEXT_REMOTE.
90  void clickedRemote();
91 
92  // Slot for when the user clicks the host line edit. Updates the help text
93  // to TBConstants::OPEN_TEXT_HOST.
94  void clickedHost();
95 
96  // Slot for when the user clicks the port line edit. Updates the help text
97  // to TBConstants::OPEN_TEXT_PORT.
98  void clickedPort();
99 
100  // Slot for when the user clicks the location line edit. Updates the help
101  // text to TBConstants::OPEN_TEXT_LOCATION.
102  void clickedLocation();
103 
104  // Slot for when the user clicks the direct box. Updates the help text to
105  // TBConstants::OPEN_TEXT_DIRECT.
106  void clickedDirect();
107 
108  // Slot for when the user clicks the XML box. Updates the help text to
109  // TBConstants::OPEN_TEXT_XML.
110  void clickedXML();
111 
112  // Slot for when the user clicks the home parser box. Updates the help
113  // text to TBConstants::OPEN_TEXT_HOME.
114  void clickedHome();
115 
116  // Slot for when the user clicks the DOM parser box. Updates the help
117  // text to TBConstants::OPEN_TEXT_DOM.
118  void clickedDOM();
119 
120  // Slot for when the user clicks the SAX parser box. Updates the help text
121  // to TBConstants::OPEN_TEXT_SAX.
122  void clickedSAX();
123 
124  // Slot for when the user clicks the start line edit. Updates the help
125  // text to TBConstants::OPEN_TEXT_START.
126  void clickedStart();
127 
128  // Slot for when the user clicks the num line edit. Updates the help text
129  // to TBConstants::OPEN_TEXT_NUM.
130  void clickedNum();
131 };
132 
133 }
134 
135 #endif /* TBCONNECTION_H_ */
void clickedXML()
Slot for when the user clicks the XML box.
void clickedHost()
Slot for when the user clicks the host line edit.
void clickedHome()
Slot for when the user clicks the home parser box.
void accepted()
Slot for when the user clicks the &quot;accept&quot; button.
TBConnection(TBMain *main, QWidget *parent=NULL)
Builds a connection dialog with the given TBMain.
Dialog for opening/connecting to a table with options.
void clickedNum()
Slot for when the user clicks the num line edit.
Main window which is mainly responsible for menu actions.
Definition: TBMain.qo.h:55
void clickedLocation()
Slot for when the user clicks the location line edit.
void browse()
Slot for when the user clicks the &quot;browse&quot; button.
void clickedPort()
Slot for when the user clicks the port line edit.
void clickedDirect()
Slot for when the user clicks the direct box.
void clickedRemote()
Slot for when the user clicks the remote box.
bool eventFilter(QObject *obj, QEvent *event)
Detects when one of the QLineEdit objects are clicked and calls the relevant clicked[Name]() slot...
void clickedLocal()
Slot for when the user clicks the local box.
TBMain * parent
Pointer to TBMain parent.
void clickedStart()
Slot for when the user clicks the start line edit.
void clickedSAX()
Slot for when the user clicks the SAX parser box.
void clickedDOM()
Slot for when the user clicks the DOM parser box.