casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TBTypes.qo.h
Go to the documentation of this file.
1 //# TBTypes.qo.h: (Not finished) Widget for entering a value based on its type.
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 TBTYPES_H_
28 #define TBTYPES_H_
29 
30 #include <casaqt/QtBrowser/TBTypes.ui.h>
31 
32 #include <QtGui>
33 
34 #include <casa/BasicSL/String.h>
35 
36 namespace casa {
37 
38 // <summary>
39 // (Not finished) Widget for entering a value based on its type.
40 // </summary>
41 //
42 // <synopsis>
43 // TBTypes is a widget with a number of different panels. Each panel has
44 // a different type of input that correspondings to different data types.
45 // (For example, when entering a number a text field is used whereas entering
46 // a complex has two spinners.) Using the TBTypes::setType() method, the
47 // different panels are shown or hidden as necessary. Important: the
48 // functionality of actually collecting the input is not yet implemented.
49 // </synopsis>
50 
51 class TBTypes : public QWidget, Ui::Types {
52  Q_OBJECT
53 
54 public:
55  // Constructor that takes the starting type and whether or not to include
56  // arrays in the list of types available.
57  TBTypes(casacore::String type, bool incArrays = true);
58 
59  ~TBTypes();
60 
61 
62  // Sets the current display to allow values for the given type.
63  void setType(casacore::String type);
64 
65 private:
66  // Current type.
68 
69  // All available types.
70  std::vector<casacore::String>* types;
71 
72  // TBTypes panel for entering single array cell values.
74 
75  // TBTypes panel for entering single record values.
77 
78 
79  // Sets up the display needed for arrays.
80  void setupArray();
81 
82  // Sets up the display needed for records.
83  void setupRecord();
84 
85 private slots:
86  // Slot for when the user selects a type in the record chooser.
87  void recordChooserChanged(int index);
88 
89  // Slot for when the user enters the dimensions for an array.
90  void arrayDimSet();
91 
92  // Slot for when the user sets the value of an array cell. (Not
93  // implemented.)
94  void arrayValSet();
95 };
96 
97 }
98 
99 #endif
void setType(casacore::String type)
Sets the current display to allow values for the given type.
TBTypes(casacore::String type, bool incArrays=true)
Constructor that takes the starting type and whether or not to include arrays in the list of types av...
(Not finished) Widget for entering a value based on its type.
Definition: TBTypes.qo.h:51
void recordChooserChanged(int index)
Slot for when the user selects a type in the record chooser.
std::vector< casacore::String > * types
All available types.
Definition: TBTypes.qo.h:70
TBTypes * arrayTypes
TBTypes panel for entering single array cell values.
Definition: TBTypes.qo.h:73
void arrayDimSet()
Slot for when the user enters the dimensions for an array.
void setupRecord()
Sets up the display needed for records.
casacore::String type
Current type.
Definition: TBTypes.qo.h:67
void setupArray()
Sets up the display needed for arrays.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
TBTypes * recordTypes
TBTypes panel for entering single record values.
Definition: TBTypes.qo.h:76
void arrayValSet()
Slot for when the user sets the value of an array cell.