casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Signals | Public Member Functions | Static Public Member Functions | Private Slots | List of all members
casa::TBTaQL Class Reference

GUI for entering a TaQL command. More...

#include <TBTaQL.qo.h>

Inheritance diagram for casa::TBTaQL:

Public Types

enum  Command {
  SELECT,
  UPDATE,
  INSERT,
  DELETE,
  CALC,
  CREATE
}
 Available commands. More...
 

Signals

void command (casacore::String command)
 This signal is emitted whenever the user has accepted the entered TaQL command. More...
 
void closeRequested ()
 This signal is emitted whenever the user presses the "Close" button. More...
 

Public Member Functions

 Q_DECLARE_FLAGS (Commands, Command)
 
 TBTaQL (QWidget *parent=NULL, Commands commands=SELECT)
 Constructor which optionally takes the parent and the commands to show in the builder command chooser. More...
 
 ~TBTaQL ()
 

Static Public Member Functions

static casacore::String command (Command c)
 Returns the casacore::String representation of the given command. More...
 

Private Slots

void doBrowse ()
 Slot for the "browse" button. More...
 
void doGenerate ()
 Slot for the "generate" button. More...
 
void doAccept ()
 Slot for the "accept" button. More...
 
void doClose ()
 Slot for the "close" button. More...
 

Detailed Description

GUI for entering a TaQL command.

Synopsis

A TBTaQL widget contains two basic parts: the builder and the command text edit. The builder contains GUI components that allow the user to visually put together a TaQL command; once the command is built, the actual comamnd can be generated. The command can also be manually edited. When the command is accepted, a signal is emitted with the command in casacore::String format; it is the parent/caller's responsibility to collect the command. NOTE: at this time, only the builder for the SELECT command has been implemented (and not a very advanced implementation, at that).

Definition at line 53 of file TBTaQL.qo.h.

Member Enumeration Documentation

Available commands.

Makes use of the QFlags for easy combining of multiple Command enums into one Command enum.

Enumerator
SELECT 
UPDATE 
INSERT 
DELETE 
CALC 
CREATE 

Definition at line 60 of file TBTaQL.qo.h.

Constructor & Destructor Documentation

casa::TBTaQL::TBTaQL ( QWidget *  parent = NULL,
Commands  commands = SELECT 
)

Constructor which optionally takes the parent and the commands to show in the builder command chooser.

If parent is NULL, the TBTaQL is presented as a QDialog.

casa::TBTaQL::~TBTaQL ( )

Member Function Documentation

void casa::TBTaQL::closeRequested ( )
signal

This signal is emitted whenever the user presses the "Close" button.

NOTE: if this TBTaQL is in dialog mode, it will close itself; if it is in widget mode, the parent is responsible for closing it. This signal is not emitted if in dialog mode.

static casacore::String casa::TBTaQL::command ( Command  c)
inlinestatic

Returns the casacore::String representation of the given command.

Definition at line 72 of file TBTaQL.qo.h.

References CALC, CREATE, DELETE, INSERT, SELECT, and UPDATE.

void casa::TBTaQL::command ( casacore::String  command)
signal

This signal is emitted whenever the user has accepted the entered TaQL command.

void casa::TBTaQL::doAccept ( )
privateslot

Slot for the "accept" button.

Emits the command() signal and, if the TBTaQL is in dialog mode, closes the dialog.

void casa::TBTaQL::doBrowse ( )
privateslot

Slot for the "browse" button.

Opens a file browser and puts the result in the location text edit.

void casa::TBTaQL::doClose ( )
privateslot

Slot for the "close" button.

If the TBTaQL is in dialog mode, closes the dialog; otherwise, emits the closeRequested() signal.

void casa::TBTaQL::doGenerate ( )
privateslot

Slot for the "generate" button.

Generates the TaQL command from the state of the builder widgets.

casa::TBTaQL::Q_DECLARE_FLAGS ( Commands  ,
Command   
)

The documentation for this class was generated from the following file: