#include <mainpage.h>
Public Member Functions | |
| MainPage (QWidget *parent=0) | |
| ~MainPage () | |
Public Attributes | |
| QComboBox * | m_CboCurrentDb |
| QLabel * | connectionCounter |
| QLabel * | currentTime |
| QToolBar * | tableToolBar |
| QComboBox * | m_cboThemes |
Definition at line 18 of file mainpage.h.
| MainPage::MainPage | ( | QWidget * | parent = 0 ) |
[explicit] |
Definition at line 8 of file mainpage.cpp.
References connectionCounter, currentTime, m_CboCurrentDb, m_cboThemes, and tableToolBar.
:
QMainWindow(parent),
ui(new Ui::MainPage)
{
ui->setupUi(this);
//
windowMapper = new QSignalMapper(this);
m_CboCurrentDb = new QComboBox(this);
m_QueryEditorActions = new QActionGroup(this);
connectionCounter = new QLabel(this);
currentTime = new QLabel(this);
tableToolBar = new QToolBar("Table Toolbar", this);
m_cboThemes = new QComboBox(this);
//
ui->toolBar->setWindowTitle("Standard Toolbar");
//
//
m_cboThemes->insertItem(0, "Cleanlooks");
m_cboThemes->insertItem(1, "Plastique");
m_cboThemes->insertItem(2, "WindowsVista");
m_cboThemes->insertItem(3, "Windows");
m_cboThemes->insertItem(4, "WindowsXP");
m_cboThemes->insertItem(5, "Motif");
m_cboThemes->insertItem(6, "CDE");
//
connectionCounter->setContextMenuPolicy(Qt::CustomContextMenu);
currentTime->setText(tr("Connected Since: %1").arg(QTime::currentTime().toString("HH:mm:ss")));
//
windowStyle = new QActionGroup(this);
mdi = new QAction(this);
mdi->setText("Multiple windows view");
mdi->setCheckable(true);
mdi->setChecked(true);
tabbed = new QAction(this);
tabbed->setText("Tabbed windows view");
tabbed->setCheckable(true);
tabbed->setChecked(false);
windowStyle->addAction(mdi);
windowStyle->addAction(tabbed);
//
ui->actionUndo->setEnabled(false);
ui->actionCut->setEnabled(false);
ui->actionCopy->setEnabled(false);
ui->actionRedo->setEnabled(false);
//
flags = 0;
flags = Qt::Popup;
flags |= Qt::MSWindowsFixedSizeDialogHint;
//connections
connect (ui->actionExit, SIGNAL(triggered()), qApp, SLOT(quit()));
connect (ui->actionConnect_To_Server, SIGNAL(triggered()), this, SLOT(connectToServer()));
connect (ui->mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(refreshMenus()));
connect (ui->actionClose_Connection, SIGNAL(triggered()), this, SLOT(closeConnection()));
connect (ui->actionCascade, SIGNAL(triggered()), this, SLOT(cascade()));
connect (ui->actionTile_Windows, SIGNAL(triggered()), this, SLOT(tileWindows()));
connect (ui->menuWindows, SIGNAL(aboutToShow()), this, SLOT(showWindowMenu()));
connect (windowMapper, SIGNAL(mapped(QWidget*)),this, SLOT(setActiveSubWindow(QWidget*)));
connect (ui->actionCreate_Database, SIGNAL(triggered()), this, SLOT(newDatabase()));
connect (ui->actionOpen, SIGNAL(triggered()), this, SLOT(openSqlFile()));
connect (ui->actionSave, SIGNAL(triggered()), this, SLOT(saveSqlFile()));
connect (ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
connect (ui->actionCreate_Table, SIGNAL(triggered()), this, SLOT(newTable()));
connect (ui->actionAlter_Table, SIGNAL(triggered()), this, SLOT(editTable()));
connect (ui->actionRename_Table, SIGNAL(triggered()), this, SLOT(renameTable()));
connect (m_cboThemes, SIGNAL(currentIndexChanged(QString)), this, SLOT(setTheme(QString)));
connect (ui->actionTruncate_Table, SIGNAL(triggered()), this, SLOT(truncateTable()));
connect (ui->actionAbout_Qt, SIGNAL(triggered()), this, SLOT(aboutQt()));
connect (ui->actionDrop_Table, SIGNAL(triggered()), this, SLOT(dropTable()));
connect (ui->actionBackup_Database_As_SQL_Dump, SIGNAL(triggered()), this, SLOT(dumpDbAsSQL()));
connect (ui->actionBackup_Table_As_SQL_Dump, SIGNAL(triggered()), this, SLOT(dumpTableAsSQL()));
connect (ui->actionExport_Table_as_CSV, SIGNAL(triggered()), this, SLOT(exportTable()));
connect (ui->actionExport_View, SIGNAL(triggered()), this, SLOT(exportTable()));
connect (ui->actionManage_Indexes, SIGNAL(triggered()), this, SLOT(manageIndexes()));
connect (ui->actionCreate_View, SIGNAL(triggered()), this, SLOT(subCreateView()));
connect (ui->actionAlter_View, SIGNAL(triggered()), this, SLOT(alterView()));
connect (mdi, SIGNAL(triggered()), this, SLOT(setWindowMode()));
connect (tabbed, SIGNAL(triggered()), this, SLOT(setWindowMode()));
connect (ui->actionDrop_View, SIGNAL(triggered()), this, SLOT(dropView()));
//end connections
//
m_cboThemes->setVisible(true);
//
setUpToolBar();
setUpStatusBar();
this->showMaximized();
connectToServer();
refreshMenus();
}
| MainPage::~MainPage | ( | ) |
Definition at line 97 of file mainpage.cpp.
{
delete ui;
}
| QLabel* MainPage::connectionCounter |
Definition at line 26 of file mainpage.h.
Referenced by MainPage().
| QLabel* MainPage::currentTime |
Definition at line 27 of file mainpage.h.
Referenced by MainPage().
| QComboBox* MainPage::m_CboCurrentDb |
Definition at line 25 of file mainpage.h.
Referenced by MainPage().
| QComboBox* MainPage::m_cboThemes |
Definition at line 29 of file mainpage.h.
Referenced by MainPage().
| QToolBar* MainPage::tableToolBar |
Definition at line 28 of file mainpage.h.
Referenced by MainPage().
1.7.2