Referencia de la Clase toMain

#include <tomain.h>

Diagrama de herencias de toMain

[leyenda]
Diagrama de colaboración para toMain:
[leyenda]
Lista de todos los miembros.

Slots públicos

void windowsMenu (void)
void statusMenu (void)
void contextHelp (void)
void windowActivated (QWidget *)
void editFileMenu (void)
void checkCaching (void)
void changeConnection (void)

Señales

void sqlEditor (const QString &str)
void addedConnection (const QString &str)
void removedConnection (const QString &str)
void willCommit (toConnection &conn, bool cmt)

Métodos públicos

 toMain ()
QWorkspace * workspace ()
toConnection & currentConnection (void)
virtual bool close (bool del)
void createDefault (void)
void setCoordinates (int, int)
QPopupMenu * fileMenu ()
QPopupMenu * editMenu ()
QPopupMenu * toolsMenu ()
QPopupMenu * helpMenu ()
std::list< QString > connections (void)
toConnection & connection (const QString &)
void setNeedCommit (toConnection &conn, bool needCommit=true)
void editSQL (const QString &str)
void registerSQLEditor (int toolid)
void displayMessage (const QString &str)

Métodos públicos estáticos

static void setEditWidget (toEditWidget *edit)
static void editEnable (toEditWidget *edit)
static void editDisable (toEditWidget *edit)

Atributos públicos estáticos

static const int TO_FILE_MENU = 10
static const int TO_EDIT_MENU = 20
static const int TO_TOOLS_MENU = 30
static const int TO_WINDOWS_MENU = 40
static const int TO_HELP_MENU = 50
static const int TO_TOOL_MENU_ID = 2000
static const int TO_TOOL_MENU_ID_END = 2999
static const int TO_TOOL_ABOUT_ID = 3000
static const int TO_TOOL_ABOUT_ID_END = 3999

Slots privados

void addConnection (void)
bool delConnection (void)
void commandCallback (int cmd)
void commitButton (void)
void rollbackButton (void)
void loadButton (void)
void saveButton (void)
void printButton (void)
void undoButton (void)
void redoButton (void)
void copyButton (void)
void cutButton (void)
void pasteButton (void)
void displayMessage (void)

Métodos privados

void addConnection (toConnection *conn)
toEditWidget * findEdit (QWidget *edit)
void editEnable (toEditWidget *edit, bool open, bool save, bool print, bool undo, bool redo, bool cut, bool copy, bool paste, bool search, bool selectAll, bool readAll)

Atributos privados

std::list< toConnection * > Connections
QWorkspace * Workspace
QComboBoxConnectionSelection
std::map< int, toTool * > Tools
std::map< QToolButton *, toTool * > NeedConnection
int SQLEditor
std::list< QString > StatusMessages
QToolButtonDisconnectButton
QToolButtonLoadButton
QToolButtonSaveButton
QToolButtonPrintButton
QToolButtonUndoButton
QToolButtonRedoButton
QToolButtonCutButton
QToolButtonCopyButton
QToolButtonPasteButton
QPopupMenu * FileMenu
QPopupMenu * EditMenu
QPopupMenu * ToolsMenu
QPopupMenu * WindowsMenu
QPopupMenu * HelpMenu
QPopupMenu * StatusMenu
QLabel * ColumnLabel
QLabel * RowLabel
toBackground Poll
toSearchReplace * Search
int DefaultTool
toEditWidget * Edit

Descripción detallada

This class defines the main window. Observe that this class will have different baseclass depending on if TOra is a Qt or KDE application. In the case of Qt this will be a QMainWindow descendant.


Documentación del constructor y destructor

toMain::toMain  ) 
 

Create main window. Always NULL as parent.

Gráfico de llamadas para esta función:


Documentación de las funciones miembro

void toMain::addConnection void   )  [private, slot]
 

Add a connection

void toMain::addConnection toConnection *  conn  )  [private]
 

Add a new connection. The connection itself must already be created.

Gráfico de llamadas para esta función:

void toMain::addedConnection const QString &  str  )  [signal]
 

Invoked when a connection is added.

Parámetros:
str Connection identifier.

void toMain::changeConnection void   )  [slot]
 

Change current connection

void toMain::checkCaching void   )  [slot]
 

Check if object caching is done.

bool toMain::close bool  del  )  [virtual]
 

Close window

Parámetros:
del If user interaction is allowed.
Devuelve:
True if close was allowed, otherwise false.

Gráfico de llamadas para esta función:

void toMain::commandCallback int  cmd  )  [private, slot]
 

Handles menu selections

Parámetros:
cmd Menu entry ID selected

void toMain::commitButton void   )  [private, slot]
 

Commit button pressed

toConnection & toMain::connection const QString &   ) 
 

Get a connection identified by a string.

Devuelve:
A reference to a connection.
Excepciones:
QString If connection wasn't found.

std::list< QString > toMain::connections void   ) 
 

Get a list of currently open connections.

Devuelve:
List of connection names. The returned list can then be used by connection to get the actual connection.

Gráfico de llamadas para esta función:

void toMain::contextHelp void   )  [slot]
 

Display context help.

void toMain::copyButton void   )  [private, slot]
 

Copy button pressed

void toMain::createDefault void   ) 
 

Create the default tool for the current connection.

This is the tool with the highest priority, usually the SQL worksheet.

toConnection & toMain::currentConnection void   ) 
 

Get the current database connection

Devuelve:
Reference to current connection.

void toMain::cutButton void   )  [private, slot]
 

Cut button pressed

bool toMain::delConnection void   )  [private, slot]
 

Remove a connection

void toMain::displayMessage void   )  [private, slot]
 

Display status message

void toMain::displayMessage const QString &  str  ) 
 

Display status message in dialog.

Gráfico de llamadas para esta función:

void toMain::editDisable toEditWidget *  edit  )  [static]
 

Disable all the current available items in the user interface (That editEnable can enable). If specified widget has the focus the edit widget is cleared.

Gráfico de llamadas para esta función:

void toMain::editEnable toEditWidget *  edit  )  [static]
 

Set available menu items in user interface. It is not enough to just call this function to make open for instance to actually work. It is a lot of more especially in commandCallback and editFileMenu. Will only update if this is the current editing widget.

Gráfico de llamadas para esta función:

void toMain::editEnable toEditWidget *  edit,
bool  open,
bool  save,
bool  print,
bool  undo,
bool  redo,
bool  cut,
bool  copy,
bool  paste,
bool  search,
bool  selectAll,
bool  readAll
[private]
 

void toMain::editFileMenu void   )  [slot]
 

Used to enable/disable entries in the edit & file menu

QPopupMenu* toMain::editMenu  )  [inline]
 

Get the edit menu.

Devuelve:
Edit menu

void toMain::editSQL const QString &  str  ) 
 

Edit an SQL statement in the SQL editor if any connected.

Parámetros:
str Identifier of the SQL to edit.

QPopupMenu* toMain::fileMenu  )  [inline]
 

Get the file menu.

Devuelve:
File menu

toEditWidget * toMain::findEdit QWidget edit  )  [private]
 

QPopupMenu* toMain::helpMenu  )  [inline]
 

Get the help menu.

Devuelve:
Help menu

void toMain::loadButton void   )  [private, slot]
 

Load button pressed

void toMain::pasteButton void   )  [private, slot]
 

Paste button pressed

void toMain::printButton void   )  [private, slot]
 

Print button pressed

void toMain::redoButton void   )  [private, slot]
 

Redo button pressed

void toMain::registerSQLEditor int  toolid  ) 
 

Register a tool which to use as an SQL editor. When something is to be edited first a toolwindow will be created and the sqlEditor will be emited, so the SQL editor must connect to this signal as well.

Parámetros:
toolid Which tool identifier to register as the SQL editor. This is the value which is passed to the toTool::customSetup member.

void toMain::removedConnection const QString &  str  )  [signal]
 

Invoked when a connection is removed.

Parámetros:
str Connection identifier.

void toMain::rollbackButton void   )  [private, slot]
 

Rollback button pressed

void toMain::saveButton void   )  [private, slot]
 

Save button pressed

void toMain::setCoordinates int  ,
int 
 

Set coordinates in the statusbar.

Used to indicate current cursor position by child widgets.

void toMain::setEditWidget toEditWidget *  edit  )  [static]
 

Set the widget to edit through menues and toolbar.

Gráfico de llamadas para esta función:

void toMain::setNeedCommit toConnection &  conn,
bool  needCommit = true
 

Set if a connection needs to be commited. Also updates visual feedback in interface.

void toMain::sqlEditor const QString &  str  )  [signal]
 

Invoked to start editing an SQL identifier.

Parámetros:
str Identifier to start editing.

void toMain::statusMenu void   )  [slot]
 

Used to fill the status menu with the latest status entries

QPopupMenu* toMain::toolsMenu  )  [inline]
 

Get the tools menu.

Devuelve:
Tools menu

void toMain::undoButton void   )  [private, slot]
 

Undo button pressed

void toMain::willCommit toConnection &  conn,
bool  cmt
[signal]
 

Emitted before a commit or rollback is made to the current connection.

Parámetros:
conn Connection that is commited
cmt True if commit, false if rollback.

void toMain::windowActivated QWidget  )  [slot]
 

Called when active window is changed.

void toMain::windowsMenu void   )  [slot]
 

Used to enable/disable entries in the windows menu

QWorkspace* toMain::workspace  )  [inline]
 

Get the workspace widget of the main window.

Devuelve:
Workspace widget.


Documentación de los datos miembro

QLabel* toMain::ColumnLabel [private]
 

Current column label.

std::list<toConnection *> toMain::Connections [private]
 

The connections that have been opened in TOra.

QComboBox* toMain::ConnectionSelection [private]
 

Handles available connections list in toolbar.

QToolButton* toMain::CopyButton [private]
 

Copy button.

QToolButton* toMain::CutButton [private]
 

Cut button.

int toMain::DefaultTool [private]
 

Default tool id

QToolButton* toMain::DisconnectButton [private]
 

Disconnect connection button.

toEditWidget* toMain::Edit [private]
 

QPopupMenu* toMain::EditMenu [private]
 

Edit menu.

QPopupMenu* toMain::FileMenu [private]
 

File menu.

QPopupMenu* toMain::HelpMenu [private]
 

Help menu.

QToolButton* toMain::LoadButton [private]
 

Load file button.

std::map<QToolButton *,toTool *> toMain::NeedConnection [private]
 

A list of toolbuttons that need an open connection to be enabled. If tool pointer is zero simply require any connection to be enabled.

QToolButton* toMain::PasteButton [private]
 

Paste button.

toBackground toMain::Poll [private]
 

QToolButton* toMain::PrintButton [private]
 

Print button.

QToolButton* toMain::RedoButton [private]
 

Redo button.

QLabel* toMain::RowLabel [private]
 

Current row label.

QToolButton* toMain::SaveButton [private]
 

Save file button.

toSearchReplace* toMain::Search [private]
 

Search & replace dialog if available.

int toMain::SQLEditor [private]
 

The ID of the tool providing the SQL editor.

QPopupMenu* toMain::StatusMenu [private]
 

Display latest status messages

std::list<QString> toMain::StatusMessages [private]
 

Status messages to display

const int toMain::TO_EDIT_MENU = 20 [static]
 

ID of the edit menu

const int toMain::TO_FILE_MENU = 10 [static]
 

ID of the file menu

const int toMain::TO_HELP_MENU = 50 [static]
 

ID of the help menu

const int toMain::TO_TOOL_ABOUT_ID = 3000 [static]
 

First ID of the tool specific about menu items.

const int toMain::TO_TOOL_ABOUT_ID_END = 3999 [static]
 

Last ID of the tool specific about menu items.

const int toMain::TO_TOOL_MENU_ID = 2000 [static]
 

First ID of the tool specific menu items.

const int toMain::TO_TOOL_MENU_ID_END = 2999 [static]
 

Last ID of the tool specific menu items.

const int toMain::TO_TOOLS_MENU = 30 [static]
 

ID of the tools menu

const int toMain::TO_WINDOWS_MENU = 40 [static]
 

ID of the windows menu

std::map<int,toTool *> toMain::Tools [private]
 

A map from menu ID:s to tools.

QPopupMenu* toMain::ToolsMenu [private]
 

Tools menu.

QToolButton* toMain::UndoButton [private]
 

Undo button.

QPopupMenu* toMain::WindowsMenu [private]
 

Windows menu.

QWorkspace* toMain::Workspace [private]
 

Workspace of main window.


La documentación para esta clase fué generada a partir de los siguientes archivos:
Generado el Sat May 21 00:05:09 2005 para BulmaGes por  doxygen 1.4.2