From 29c521058e3cf7b1a7fb628420be082216a8af93 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 27 Mar 2007 20:07:07 +0000 Subject: [PATCH] Tweak names git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4440 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/mainwin.cpp | 27 +++++++++++++++++---------- bacula/src/qt-console/mainwin.h | 4 ++-- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 3400c83760..46551b987e 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -178,10 +178,12 @@ void MainWin::createConnections() connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(input_line())); connect(actionAbout_bat, SIGNAL(triggered()), this, SLOT(about())); -/* connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem *, int)), this, +#ifdef xxx + connect(treeWidget, SIGNAL(itemActivated(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int))); connect(treeWidget, SIGNAL(itemPressed(QTreeWidgetItem *, int)), this, - SLOT(treeItemClicked(QTreeWidgetItem *, int))); Commented out because it was getting to clicked multiple times*/ + SLOT(treeItemClicked(QTreeWidgetItem *, int))); +#endif connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int))); connect(treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, @@ -194,7 +196,7 @@ void MainWin::createConnections() connect(actionLabel, SIGNAL(triggered()), this, SLOT(labelDialogClicked())); connect(actionRun, SIGNAL(triggered()), this, SLOT(runDialogClicked())); connect(actionRestore, SIGNAL(triggered()), this, SLOT(restoreDialogClicked())); - connect(actionPullWindowOut, SIGNAL(triggered()), this, SLOT(pullWindowOutButton())); + connect(actionPullWindowOut, SIGNAL(triggered()), this, SLOT(floatWindowButton())); } /* @@ -228,10 +230,12 @@ void MainWin::readSettings() settings.endGroup(); } +/* + * This subroutine is called with an item in the Page Selection window + * is clicked + */ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column) { - (void)column; - /* Use tree item's Qt::UserRole to get treeindex */ int treeindex = item->data(column, Qt::UserRole).toInt(); int stackindex=stackedWidget->indexOf(m_bstacklist[treeindex]); @@ -244,18 +248,21 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column) } /* + * This subroutine is called with an item in the Page Selection window + * is double clicked */ void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column) { - (void)column; int treeindex = item->data(column, Qt::UserRole).toInt(); /* Use tree item's Qt::UserRole to get treeindex */ if ( m_bstacklist[treeindex]->isStacked() == true ){ m_bstackpophold=m_bstacklist[treeindex]; - /* Create a popup menu before pulling window out */ + + /* Create a popup menu before floating window */ QMenu *popup = new QMenu( treeWidget ); - connect(popup->addAction("Pull Window Out"), SIGNAL(triggered()), this, SLOT(pullWindowOut())); + connect(popup->addAction("Float Window"), SIGNAL(triggered()), this, + SLOT(floatWindow())); popup->exec(QCursor::pos()); } else { /* Just pull it back in without prompting */ @@ -330,12 +337,12 @@ void MainWin::set_status(const char *buf) statusBar()->showMessage(buf); } -void MainWin::pullWindowOut() +void MainWin::floatWindow() { m_bstackpophold->Togglestack(); } -void MainWin::pullWindowOutButton() +void MainWin::floatWindowButton() { int curindex = stackedWidget->currentIndex(); QList::iterator bstackItem = m_bstacklist.begin(); diff --git a/bacula/src/qt-console/mainwin.h b/bacula/src/qt-console/mainwin.h index 662d19277f..3e5d3283c0 100644 --- a/bacula/src/qt-console/mainwin.h +++ b/bacula/src/qt-console/mainwin.h @@ -69,8 +69,8 @@ public slots: void labelDialogClicked(); void runDialogClicked(); void restoreDialogClicked(); - void pullWindowOut(); - void pullWindowOutButton(); + void floatWindow(); + void floatWindowButton(); protected: void closeEvent(QCloseEvent *event); -- 2.39.5