Commit 11dbaa57 authored by JanKusanagi's avatar JanKusanagi

Access CharacterPicker from the comment editor, too

parent e6aca45a
......@@ -109,6 +109,10 @@ CommenterBlock::CommenterBlock(PumpController *pumpController,
// Formatting/Tools button exported from Composer
m_toolsButton = m_commentComposer->getToolsButton();
// Optional character picker button, also taken from Composer
#ifdef HAVE_KCHARSELECT
m_charPickerButton = m_commentComposer->getCharPickerButton();
#endif
// Info label about sending status
m_statusInfoLabel = new QLabel(this);
......@@ -145,7 +149,10 @@ CommenterBlock::CommenterBlock(PumpController *pumpController,
m_bottomLayout->setSpacing(1);
m_bottomLayout->addWidget(m_commentComposer, 0, 0, 8, 3);
m_bottomLayout->addWidget(m_toolsButton, 0, 3, 1, 1);
m_bottomLayout->addWidget(m_statusInfoLabel, 1, 3, 5, 1, Qt::AlignCenter);
#ifdef HAVE_KCHARSELECT
m_bottomLayout->addWidget(m_charPickerButton, 1, 3, 1, 1);
#endif
m_bottomLayout->addWidget(m_statusInfoLabel, 2, 3, 4, 1, Qt::AlignCenter);
m_bottomLayout->addWidget(m_commentButton, 6, 3, 1, 1);
m_bottomLayout->addWidget(m_cancelButton, 7, 3, 1, 1);
......@@ -466,6 +473,9 @@ void CommenterBlock::toggleWidgetsWhileSending(bool widgetsEnabled)
m_showAllCommentsLinkLabel->setEnabled(widgetsEnabled);
m_commentComposer->setEnabled(widgetsEnabled);
m_toolsButton->setEnabled(widgetsEnabled);
#ifdef HAVE_KCHARSELECT
m_charPickerButton->setEnabled(widgetsEnabled);
#endif
m_commentButton->setEnabled(widgetsEnabled);
}
......@@ -493,6 +503,9 @@ void CommenterBlock::setMinimumMode()
{
m_commentComposer->hide();
m_toolsButton->hide();
#ifdef HAVE_KCHARSELECT
m_charPickerButton->hide();
#endif
m_statusInfoLabel->clear();
m_statusInfoLabel->hide();
m_commentButton->hide();
......@@ -523,6 +536,9 @@ void CommenterBlock::setFullMode(QString initialText)
{
m_commentComposer->show();
m_toolsButton->show();
#ifdef HAVE_KCHARSELECT
m_charPickerButton->show();
#endif
m_statusInfoLabel->show();
m_commentButton->show();
m_cancelButton->show();
......
......@@ -26,6 +26,7 @@
#include <QGridLayout>
#include <QScrollArea>
#include <QPushButton>
#include <QToolButton>
#include <QLabel>
#include <QScrollBar>
#include <QTimer>
......@@ -120,6 +121,9 @@ private:
Composer *m_commentComposer;
QPushButton *m_toolsButton;
#ifdef HAVE_KCHARSELECT
QToolButton *m_charPickerButton;
#endif
QLabel *m_statusInfoLabel;
QPushButton *m_commentButton;
QPushButton *m_cancelButton;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment