From: <ibr...@us...> - 2013-01-03 10:44:28
|
Revision: 4558 http://tora.svn.sourceforge.net/tora/?rev=4558&view=rev Author: ibre5041 Date: 2013-01-03 10:44:22 +0000 (Thu, 03 Jan 2013) Log Message: ----------- Added Paths: ----------- branches/tora-trotl/src/trotl_test4.h Property Changed: ---------------- branches/tora-trotl/ Property changes on: branches/tora-trotl ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/tora:3191-4325 + /trunk/tora:3191-4328 Added: branches/tora-trotl/src/trotl_test4.h =================================================================== --- branches/tora-trotl/src/trotl_test4.h (rev 0) +++ branches/tora-trotl/src/trotl_test4.h 2013-01-03 10:44:22 UTC (rev 4558) @@ -0,0 +1,132 @@ +#ifndef TROTL_TEST4_H +#define TROTL_TEST4_H + +#include <QObject> +#include <QMdiArea> +#include <QMdiSubWindow> + +#include "tothread.h" +#include "tomainwindow.h" +#include "toworksheet.h" +#include "todockbar.h" +#include "tolinechart.h" +#include "tobackgroundlabel.h" + +class TrotlTest4Window : public toMainWindow +{ + Q_OBJECT; + + QMdiArea *Workspace; + + toDockbar *leftDockbar,*rightDockbar; + + std::list<toConnection *> Connections; + + QAction * m_describeAction; +public: + TrotlTest4Window(QString, QString, QString, std::set<QString>&); + + void createDockbars(); + void createDocklets(); + void moveDocklet(toDocklet *let, Qt::DockWidgetArea area); + + // All the toMainWindow methods must be "reimplemented" somehow. + QMdiArea* workspace() const { return Workspace; }; + void addCustomMenu(QMenu *) const {}; + toBackgroundLabel* getBackgroundLabel() { return NULL; }; + + std::list<QString> connections(void) { return std::list<QString>(); }; + toConnection& connection(const QString &) { return *Connections.front(); } + void updateWindowsMenu() {}; + toConnection& currentConnection(void) + { + std::list<toConnection *>::iterator i = Connections.begin(); + if(i != Connections.end()) + return *(*i); + throw tr("Can't find active connection"); + } + + void checkCaching(void) {}; + + toDockbar* dockbar(toDocklet *let); + + QMenu* getEditMenu() { return NULL; }; + + void addChart(toLineChart*) {}; + void addCustomMenu(QMenu*) {}; + void addRecentFile(const QString&) {}; + void changeConnection() {}; + void editSQL(const QString&) {}; + + QAction* getDescribeAction() { return m_describeAction; }; + + QAction* getCopyAction() { return NULL; }; + QAction* getCutAction() { return NULL; }; + QAction* getPasteAction() { return NULL; }; + QAction* getRedoAction() { return NULL; }; + QAction* getSelectAllAction() { return NULL; }; + + QAction* getUndoAction() { return NULL; }; + void registerSQLEditor(const QString&) {}; + void removeChart(toLineChart*) {}; + toSearchReplace* searchDialog() { return NULL; }; + void setCoordinates(int, int) {}; + void setNeedCommit(toConnection&, bool) {}; + void setupChart(toLineChart*) {}; + void showMessage(const QString&, bool, bool) {}; + void showMessageImpl(const QString&, bool, bool) {}; + void toolWidgetRemoved(toToolWidget*) {}; + void windowActivated(QMdiSubWindow*) {}; + void workspaceCloseWindow(int) {}; + + QMdiSubWindow* lastActiveWindow() const { return NULL; }; + + void toolWidgetAdded(toToolWidget *tool) {}; + + /** + * Add a new connection. The connection itself must already be created. + * Returns the connection or it's duplicate already opened connection. + */ + toConnection *addConnection(toConnection *conn, bool def = true) + { + /* int j = 0; */ + /* for (std::list<toConnection *>::iterator i = Connections.begin();i != Connections.end();i++, j++) */ + /* { */ + /* if ((*i)->description() == conn->description()) */ + /* { */ + /* ConnectionSelection->setCurrentIndex(j); */ + /* if (def) */ + /* createDefault(); */ + /* return *i; */ + /* } */ + /* } */ + + Connections.insert(Connections.end(), conn); + //ConnectionSelection->addItem(connectionColorPixmap(conn->color()), conn->description()); + //ConnectionSelection->setCurrentIndex(ConnectionSelection->count() - 1); + + //if (ConnectionSelection->count() == 1) + //enableConnectionActions(true); + + checkCaching(); + + changeConnection(); + //emit addedConnection(conn->description()); + + return conn; + } + + /** + * Open a file in sql worksheet + * + */ + void editOpenFile(QString file) {}; + + toEditWidget* editWidget() { return NULL; }; + + void createDefault(void) {}; +}; + + +#endif + Property changes on: branches/tora-trotl/src/trotl_test4.h ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |