casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Signals | Public Member Functions | Static Public Member Functions | Private Slots
casa::TBTaQL Class Reference

GUI for entering a TaQL command. More...

#include <TBTaQL.qo.h>

List of all members.

Public Types

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

Signals

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

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.
 ~TBTaQL ()

Static Public Member Functions

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

Private Slots

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

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 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 56 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 63 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.


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 String casa::TBTaQL::command ( Command  c) [inline, static]

Returns the String representation of the given command.

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

void casa::TBTaQL::command ( String  command) [signal]

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

void casa::TBTaQL::doAccept ( ) [private, slot]

Slot for the "accept" button.

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

void casa::TBTaQL::doBrowse ( ) [private, slot]

Slot for the "browse" button.

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

void casa::TBTaQL::doClose ( ) [private, slot]

Slot for the "close" button.

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

void casa::TBTaQL::doGenerate ( ) [private, slot]

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: