diff options
| author | 2011-04-13 08:48:04 +0000 | |
|---|---|---|
| committer | 2011-04-13 08:48:04 +0000 | |
| commit | d1a5e58def999287f4f179d6f8e5a7fee31ca4e3 (patch) | |
| tree | 3e6bbef663eb0201215eb5bdb6a0852845a5b89c /src/modules/help | |
| parent | fixed paragraph formatting; (diff) | |
| download | KVIrc-d1a5e58def999287f4f179d6f8e5a7fee31ca4e3.tar.gz KVIrc-d1a5e58def999287f4f179d6f8e5a7fee31ca4e3.tar.bz2 KVIrc-d1a5e58def999287f4f179d6f8e5a7fee31ca4e3.zip | |
fix for #1128
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5780 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/help')
| -rw-r--r-- | src/modules/help/HelpWidget.cpp | 42 | ||||
| -rw-r--r-- | src/modules/help/HelpWidget.h | 16 |
2 files changed, 11 insertions, 47 deletions
diff --git a/src/modules/help/HelpWidget.cpp b/src/modules/help/HelpWidget.cpp index edede5eb1..07e6d5a27 100644 --- a/src/modules/help/HelpWidget.cpp +++ b/src/modules/help/HelpWidget.cpp @@ -69,28 +69,15 @@ HelpWidget::HelpWidget(QWidget * par,KviMainWindow *,bool bIsStandalone) pHighlightLabel->setText(__tr2qs("Highlight: ")); m_pToolBar->addWidget(pHighlightLabel); - m_pFindText = new QLineEdit(); m_pToolBar->addWidget(m_pFindText); connect(m_pFindText,SIGNAL(textChanged(const QString )),this,SLOT(slotTextChanged(const QString))); connect(m_pTextBrowser,SIGNAL(loadFinished(bool)),this,SLOT(slotLoadFinished(bool))); - m_pBtnResetFind = new QToolButton(); - m_pBtnResetFind->setIcon(*g_pIconManager->getImage("41")); - m_pToolBar->addWidget(m_pBtnResetFind); - connect(m_pBtnResetFind ,SIGNAL(clicked()),this,SLOT(slotResetFind())); - - - m_pBtnFindPrev = new QToolButton(); - m_pBtnFindPrev->setIcon(*g_pIconManager->getImage("40")); - m_pToolBar->addWidget(m_pBtnFindPrev); - connect(m_pBtnFindPrev,SIGNAL(clicked()),this,SLOT(slotFindPrev())); - - m_pBtnFindNext = new QToolButton(); - m_pBtnFindNext->setIcon(*g_pIconManager->getImage("39")); - m_pToolBar->addWidget(m_pBtnFindNext); - connect(m_pBtnFindNext,SIGNAL(clicked()),this,SLOT(slotFindNext())); + m_pToolBar->addAction(*g_pIconManager->getSmallIcon(KviIconManager::Unrecognized), __tr2qs("Reset"), this, SLOT(slotResetFind())); + m_pToolBar->addAction(*g_pIconManager->getSmallIcon(KviIconManager::Part), __tr2qs("Find previous"), this, SLOT(slotFindPrev())); + m_pToolBar->addAction(*g_pIconManager->getSmallIcon(KviIconManager::Join), __tr2qs("Find next"), this, SLOT(slotFindNext())); m_pTextBrowser->setObjectName("text_browser"); m_pTextBrowser->setStyleSheet("QTextBrowser { background-color:white; color:black; }"); @@ -99,33 +86,18 @@ HelpWidget::HelpWidget(QWidget * par,KviMainWindow *,bool bIsStandalone) pBrowsingLabel->setText(__tr2qs("Browsing: ")); m_pToolBar->addWidget(pBrowsingLabel); - m_pBtnIndex = new QToolButton(); - m_pBtnIndex->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPINDEX)); - - connect(m_pBtnIndex,SIGNAL(clicked()),this,SLOT(showIndex())); - m_pToolBar->addWidget(m_pBtnIndex); + m_pToolBar->addAction(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPINDEX), __tr2qs("Show index"), this, SLOT(showIndex())); m_pToolBar->addAction(m_pTextBrowser->pageAction(QWebPage::Back)); m_pToolBar->addAction(m_pTextBrowser->pageAction(QWebPage::Forward)); - m_pBtnZoomIn = new QToolButton(); - m_pBtnZoomIn->setIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Plus))); - m_pToolBar->addWidget(m_pBtnZoomIn); - - connect(m_pBtnZoomIn,SIGNAL(clicked()),this,SLOT(slotZoomIn())); - - m_pBtnZoomOut = new QToolButton(); - m_pBtnZoomOut->setIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Minus))); - m_pToolBar->addWidget(m_pBtnZoomOut); + m_pToolBar->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Plus)), __tr2qs("Zoom in"), this, SLOT(slotZoomIn())); + m_pToolBar->addAction(*(g_pIconManager->getSmallIcon(KviIconManager::Minus)), __tr2qs("Zoom out"), this, SLOT(slotZoomOut())); - connect(m_pBtnZoomOut,SIGNAL(clicked()),this,SLOT(slotZoomOut())); if(bIsStandalone) { - QToolButton * b = new QToolButton(); - m_pToolBar->addWidget(b); - b->setIcon(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPCLOSE)); setAttribute(Qt::WA_DeleteOnClose); - connect(b,SIGNAL(clicked()),this,SLOT(close())); + m_pToolBar->addAction(*g_pIconManager->getBigIcon(KVI_BIGICON_HELPCLOSE), __tr2qs("Close"), this, SLOT(close())); } } diff --git a/src/modules/help/HelpWidget.h b/src/modules/help/HelpWidget.h index 78e2c9f35..f2865bdc5 100644 --- a/src/modules/help/HelpWidget.h +++ b/src/modules/help/HelpWidget.h @@ -40,7 +40,6 @@ class QToolButton; class QLineEdit; class KviMainWindow; -//class QProcess; class HelpWidget : public QWidget { @@ -50,17 +49,10 @@ public: ~HelpWidget(); private: #ifdef COMPILE_WEBKIT_SUPPORT - QToolButton * m_pBtnIndex; - QToolButton * m_pBtnFindPrev; - QToolButton * m_pBtnFindNext; - QToolButton * m_pBtnResetFind; - QToolButton * m_pBtnZoomIn; - QToolButton * m_pBtnZoomOut; - - QToolBar * m_pToolBar; - QLineEdit * m_pFindText; - QVBoxLayout *m_pLayout; - QWebView * m_pTextBrowser; + QToolBar * m_pToolBar; + QLineEdit * m_pFindText; + QVBoxLayout * m_pLayout; + QWebView * m_pTextBrowser; #else QToolButton * m_pBtnIndex; QToolButton * m_pBtnBackward; |
