aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mainwindow.cpp4
-rw-r--r--mainwindow.h21
-rw-r--r--textedit.h3
3 files changed, 20 insertions, 8 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 3b9ca29..7594864 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -53,6 +53,7 @@ MainWindow::MainWindow()
createStatusBar();
createDockWindows();
+ connect(edit->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(disableTabActions(int)));
mKeyList->addMenuAction(appendSelectedKeysAct);
mKeyList->addMenuAction(copyMailAddressToClipboardAct);
mKeyList->addMenuAction(showKeyDetailsAct);
@@ -375,7 +376,7 @@ void MainWindow::disableTabActions(int number)
{
bool disable;
- if (number == 0 ) {
+ if (number == -1 ) {
disable = true;
} else {
disable= false;
@@ -405,7 +406,6 @@ void MainWindow::disableTabActions(int number)
cutPgpHeaderAct->setDisabled(disable);
addPgpHeaderAct->setDisabled(disable);
-
}
void MainWindow::createMenus()
diff --git a/mainwindow.h b/mainwindow.h
index cf03c0e..5e380f0 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -164,6 +164,10 @@ private slots:
* @details Open integrated help in new tab.
*/
void openHelp();
+
+ /**
+ * @details Open integrated help in new tab with the specified page.
+ */
void openHelp(const QString page);
/**
@@ -181,21 +185,28 @@ private slots:
*/
void cleanDoubleLinebreaks();
+ /**
+ * @details Cut the existing PGP header and footer from current tab.
+ */
void cutPgpHeader();
+
+ /**
+ * @details Add PGP header and footer to current tab.
+ */
void addPgpHeader();
// void dropEvent(QDropEvent *event);
-private:
/**
- * @details Create actions for the main-menu and the context-menu of the keylist.
+ * @details Disable tab related actions, if number of tabs is 0.
*/
- void createActions();
+ void disableTabActions(int number);
+private:
/**
- * @details Disable tab related actions, if number of tabs is 0.
+ * @details Create actions for the main-menu and the context-menu of the keylist.
*/
- void disableTabActions(int number);
+ void createActions();
/**
* @details create the menu of the main-window.
diff --git a/textedit.h b/textedit.h
index 5a02e85..0b471e8 100644
--- a/textedit.h
+++ b/textedit.h
@@ -88,6 +88,8 @@ public:
*/
QHash<int, QString> unsavedDocuments();
+ QTabWidget *tabWidget; /** Widget containing the tabs of the editor */
+
public slots:
/**
* @details Insert a ">" at the begining of every line of current textedit.
@@ -195,7 +197,6 @@ private:
* Description: int cotaining the number of added tabs
*/
int countPage; /* TODO */
- QTabWidget *tabWidget; /** Widget containing the tabs of the editor */
private slots:
/**