#include <list>#include <map>#include <qmainwindow.h>#include <qtimer.h>#include <qtoolbutton.h>#include "tobackground.h"#include <qtoolbar.h>#include "tomainwindow.h"Go to the source code of this file.
Data Structures | |
| class | toMain |
| class | toBusy |
| class | toPopupButton |
Defines | |
| #define | TOPrinter QPrinter |
| #define | TODock QWidget |
| #define | TOFileDialog QFileDialog |
| #define | TOMessageBox QMessageBox |
| #define | TOCATCH |
Functions | |
| void | toStatusMessage (const QString &str, bool save=false, bool log=true) |
| toMain * | toMainWidget (void) |
| QString | toSQLToAddress (toConnection &conn, const QString &sql) |
| QString | toSQLString (toConnection &conn, const QString &address) |
| void | toReadableColumn (QString &col) |
| QString | toNow (toConnection &conn) |
| void | toSetSessionType (const QString &str) |
| QString | toGetSessionType (void) |
| QComboBox * | toRefreshCreate (QWidget *parent, const char *name=NULL, const QString &def=QString::null, QComboBox *item=NULL) |
| void | toRefreshParse (toTimer *timer, const QString &str=QString::null) |
| bool | toMonolithic (void) |
| QString | toDeepCopy (const QString &str) |
| QToolBar * | toAllocBar (QWidget *parent, const QString &name, const QString &db) |
| TODock * | toAllocDock (const QString &name, const QString &db, const QPixmap &icon) |
| void | toAttachDock (TODock *dock, QWidget *container, QMainWindow::ToolBarDock place) |
| int | toSizeDecode (const QString &str) |
| template<class T> | |
| T | toShift (std::list< T > &lst) |
| template<class T> | |
| void | toUnShift (std::list< T > &lst, const T &str) |
| template<class T> | |
| T | toPop (std::list< T > &lst) |
| template<class T> | |
| void | toPush (std::list< T > &lst, const T &str) |
| template<class T> | |
| std::list< T, std::allocator< T > >::iterator | toFind (typename std::list< T, std::allocator< T > > &lst, const T &str) |
| QString | toGetToken (toMarkedText *text, int &curLine, int &pos, bool forward=true, bool comments=false) |
| QFont | toStringToFont (const QString &str) |
| QString | toFontToString (const QFont &fnt) |
| QString | toHelpPath (void) |
| QCString | toReadFile (const QString &filename) |
| bool | toWriteFile (const QString &filename, const QCString &data) |
| bool | toWriteFile (const QString &filename, const QString &data) |
| bool | toCompareLists (QStringList &l1, QStringList &l2, unsigned int len) |
| void | toSetEnv (const QCString &var, const QCString &val) |
| void | toUnSetEnv (const QCString &var) |
| QString | toOpenFilename (const QString &filename, const QString &filter, QWidget *parent) |
| QString | toSaveFilename (const QString &filename, const QString &filter, QWidget *parent) |
| int | toToolMenuIndex (void) |
| bool | toIsIdent (QChar c) |
| QString | toPluginPath (void) |
| std::list< QString > | toStatusMessages (void) |
| QColor | toChartColor (int index) |
| toConnection & | toCurrentConnection (QObject *widget) |
| toToolWidget * | toCurrentTool (QObject *widget) |
| bool | toIsOracle (const toConnection &) |
| QString | toSQLStripSpecifier (const QString &sql) |
| QString | toSQLStripBind (const QString &sql) |
| QListViewItem * | toFindItem (QListView *list, const QString &str) |
| void | toToolCaption (toToolWidget *tool, const QString &caption) |
| template<class T> | |
| T | max (T a, T b) |
| template<class T> | |
| T | min (T a, T b) |
| #define TOCATCH |
Value:
catch (const QString &str) {\ toStatusMessage(str);\ }
Definition at line 813 of file tomain.h.
Referenced by toMain::addConnection(), toMain::commandCallback(), and toMain::toMain().
| #define TOPrinter QPrinter |
| T max | ( | T | a, | |
| T | b | |||
| ) |
| T min | ( | T | a, | |
| T | b | |||
| ) |
| QToolBar* toAllocBar | ( | QWidget * | parent, | |
| const QString & | name, | |||
| const QString & | db | |||
| ) |
Allocate a toolbar. This is needed since Qt and KDE use different toolbars.
| parent | Parent of toolbar. | |
| name | Name of toolbar. | |
| db | Database name or empty if N/A. |
Referenced by toMain::toMain().
| TODock* toAllocDock | ( | const QString & | name, | |
| const QString & | db, | |||
| const QPixmap & | icon | |||
| ) |
Allocate a new docked window. This is needed since Qt and KDE docks windows differently (Qt 2.x doesn't even have support for docked windows). Observe that you must attach a dock using toAttachDock after allocating it.
| name | Name of window. | |
| db | Database name or empty if N/A. | |
| icon | Icon of new dock. |
| void toAttachDock | ( | TODock * | dock, | |
| QWidget * | container, | |||
| QMainWindow::ToolBarDock | place | |||
| ) |
Attach a dock to a specified position.
| dock | Dock to attach | |
| container | Whatever container is supposed to be in the dock window. | |
| place | Where to place the dock. |
| QColor toChartColor | ( | int | index | ) |
Get a color for a chart item.
| index | Indicating which chart item to get color for. |
Definition at line 79 of file tolinechart.cpp.
References ChartColors.
Referenced by toLineChart::paintChart(), toPieChart::paintChart(), and toLineChart::paintLegend().
00080 { 00081 return ChartColors[index%(sizeof(ChartColors)/sizeof(QColor))]; 00082 }
| bool toCompareLists | ( | QStringList & | l1, | |
| QStringList & | l2, | |||
| unsigned int | len | |||
| ) |
Compare two string lists.
| l1 | First list to compare. | |
| l2 | Second list to compare. | |
| len | Length of lists to compare. |
| toConnection& toCurrentConnection | ( | QObject * | widget | ) |
Return the connection most closely associated with a widget. Currently connections are only stored in toToolWidgets.
| toToolWidget* toCurrentTool | ( | QObject * | widget | ) |
Return the tool widget most closely associated with a widget.
| QString toDeepCopy | ( | const QString & | str | ) |
Make a deep copy of a string. Usefull when sharing copying strings between threads.
| str | String to copy |
| std::list<T,std::allocator<T> >::iterator toFind | ( | typename std::list< T, std::allocator< T > > & | lst, | |
| const T & | str | |||
| ) |
Find if an item exists in a list.
| lst | List to search for value. | |
| str | Object to search for. |
Definition at line 623 of file tomain.h.
00624 { 00625 for(typename std::list<T,std::allocator<T> >::iterator i=lst.begin();i!=lst.end();i++) 00626 if (*i==str) 00627 return i; 00628 return lst.end(); 00629 }
| QListViewItem* toFindItem | ( | QListView * | list, | |
| const QString & | str | |||
| ) |
Find an item in a listview.
| list | The list to search for the item. | |
| str | The string to search for. You can specify parent/child with : in the string. |
| QString toFontToString | ( | const QFont & | fnt | ) |
Convert a font to a string representation.
| fnt | Font to convert. |
| QString toGetSessionType | ( | void | ) |
Get current session type (Style)
| QString toGetToken | ( | toMarkedText * | text, | |
| int & | curLine, | |||
| int & | pos, | |||
| bool | forward = true, |
|||
| bool | comments = false | |||
| ) |
Get next SQL token from an editor.
| text | Editor to get token from | |
| curLine | Current line when parsing, modified when calling. | |
| pos | Current position when parsing, modified when calling. | |
| forward | If true go forward from current position, otherwise backward. | |
| comments | Include comments as tokens |
| QString toHelpPath | ( | void | ) |
Get the path to the help directory.
| bool toIsIdent | ( | QChar | c | ) | [inline] |
| bool toIsOracle | ( | const toConnection & | ) |
Check if this connection is an oracle connection.
| toMain* toMainWidget | ( | void | ) |
Get a pointer to the main window
Referenced by toMain::commandCallback(), toMain::displayMessage(), and toMain::toMain().
| bool toMonolithic | ( | void | ) |
Get information about wether this TOra has plugin support or not.
| QString toNow | ( | toConnection & | conn | ) |
Get the current database time in the current sessions dateformat.
| conn | Connection to get address from. |
| QString toOpenFilename | ( | const QString & | filename, | |
| const QString & | filter, | |||
| QWidget * | parent | |||
| ) |
Pop up a dialog and choose a file to open.
| filename | Default filename to open. | |
| filter | Filter of filenames (See QFileDialog) | |
| parent | Parent of dialog. |
| QString toPluginPath | ( | void | ) |
Get installation directory of application (Plugin directory on unix, installation target on windows).
| T toPop | ( | std::list< T > & | lst | ) |
Pop the last value out of a list.
| lst | List to pop value from (Also modified). |
Definition at line 596 of file tomain.h.
00597 { 00598 if (lst.begin()==lst.end()) { 00599 T ret; 00600 return ret; 00601 } 00602 T ret=(*lst.rbegin()); 00603 lst.pop_back(); 00604 return ret; 00605 }
| void toPush | ( | std::list< T > & | lst, | |
| const T & | str | |||
| ) |
Push an object to the end of a list.
| lst | List to push value in from of. | |
| str | Object to push. |
Definition at line 611 of file tomain.h.
Referenced by toMain::connections(), and toMain::displayMessage().
| void toReadableColumn | ( | QString & | col | ) |
Make a column name more readable.
| col | Name of column name, will be modified. |
| QCString toReadFile | ( | const QString & | filename | ) |
Read file from filename.
| filename | Filename to read file from. |
| QString | describing I/O problem. |
| QComboBox* toRefreshCreate | ( | QWidget * | parent, | |
| const char * | name = NULL, |
|||
| const QString & | def = QString::null, |
|||
| QComboBox * | item = NULL | |||
| ) |
Create or fill a combobox with refresh intervals.
| parent | Parent of created combobox. | |
| name | Name of created combobox. | |
| def | Default value of the combobox. | |
| item | Combo box to fill. If not specified a new combobox is created. |
| void toRefreshParse | ( | toTimer * | timer, | |
| const QString & | str = QString::null | |||
| ) |
Set a timer with the value from a refresh combobox (See toRefreshCreate).
| timer | Timer to set timeout in. | |
| str | String from currentText of combobox. If empty, set to default. |
| QString toSaveFilename | ( | const QString & | filename, | |
| const QString & | filter, | |||
| QWidget * | parent | |||
| ) |
Pop up a dialog and choose a file to save to.
| filename | Default filename to open. | |
| filter | Filter of filenames (See QFileDialog) | |
| parent | Parent of dialog. |
| void toSetEnv | ( | const QCString & | var, | |
| const QCString & | val | |||
| ) |
Set environment variable.
| var | Variable name to set. | |
| val | Value to set variable to. |
| void toSetSessionType | ( | const QString & | str | ) |
Set the current session type (Style)
| str | Session to set, can be any of Motif, Motif Plus, SGI, CDE, Windows and Platinum |
| QString | if style not available. |
| T toShift | ( | std::list< T > & | lst | ) |
Shift the first value out of a list.
| lst | List to shift value from (Also modified). |
Definition at line 572 of file tomain.h.
Referenced by toMain::displayMessage().
00573 { 00574 if (lst.begin()==lst.end()) { 00575 T ret; 00576 return ret; 00577 } 00578 T ret=(*lst.begin()); 00579 lst.erase(lst.begin()); 00580 return ret; 00581 }
| int toSizeDecode | ( | const QString & | str | ) |
Decode a size string this basically converts "KB" to 1024, "MB" to 1024KB and everything else to 1.
| QString toSQLString | ( | toConnection & | conn, | |
| const QString & | address | |||
| ) |
Get the full SQL of an address (See toSQLToAddress) from the SGA.
| conn | Connection to get address from | |
| sql | Address of SQL. |
| QString | if address not found. |
| QString toSQLStripBind | ( | const QString & | sql | ) |
Strip extra binds and replace with empty strings.
| sql | The sql to strip. |
| QString toSQLStripSpecifier | ( | const QString & | sql | ) |
Strip extra bind specifier from an SQL statement. (That means the extra <***> part after the bind variable.
| sql | The sql to strip. |
| QString toSQLToAddress | ( | toConnection & | conn, | |
| const QString & | sql | |||
| ) |
Get an address to a SQL statement in the SGA. The address has the form 'address:hash_value' which are resolved from the v$sqltext_with_newlines view in Oracle.
| conn | Connection to get address from | |
| sql | Statement to get address for. |
| QString | if address not found. |
| void toStatusMessage | ( | const QString & | str, | |
| bool | save = false, |
|||
| bool | log = true | |||
| ) |
Display a message in the statusbar of the main window.
| str | Message to display | |
| save | If true don't remove the message after a specified interval. | |
| log | Log message. Will never log saved messages. |
Referenced by toMain::toMain().
| std::list<QString> toStatusMessages | ( | void | ) |
Get a list of the latest status messages that have been shown.
Referenced by toMain::statusMenu().
| QFont toStringToFont | ( | const QString & | str | ) |
Convert a string representation to a font structure.
| str | String representing the font. |
| void toToolCaption | ( | toToolWidget * | tool, | |
| const QString & | caption | |||
| ) |
Set or change title of a tool window.
| tool | Widget of tool. | |
| caption | Caption to set to the tool. |
| int toToolMenuIndex | ( | void | ) |
Get index of menu to insert tool specific menu at.
| void toUnSetEnv | ( | const QCString & | var | ) |
Delete an environment variable.
| var | Environment variable to delete. |
| void toUnShift | ( | std::list< T > & | lst, | |
| const T & | str | |||
| ) |
| bool toWriteFile | ( | const QString & | filename, | |
| const QString & | data | |||
| ) |
Write file to filename.
| filename | Filename to write file to. | |
| data | Data to write to file. |
| bool toWriteFile | ( | const QString & | filename, | |
| const QCString & | data | |||
| ) |
Write file to filename.
| filename | Filename to write file to. | |
| data | Data to write to file. |
1.5.1