summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-05-20 10:42:03 +0200
committerMontel Laurent <[email protected]>2017-05-20 10:42:03 +0200
commit4d6c76209f4f4f12be63c95671d82fad0a43af3e (patch)
tree459fcc0a6d20c5f65baa66e0d4b2138612414ec3
parent682ffaa75cfcec3b55d2f269966ad34a2f1d24ce (diff)
Improve layout
-rw-r--r--sieveeditor/regexeditorlineedit/regexpeditorlineedit.cpp15
-rw-r--r--sieveeditor/regexeditorlineedit/regexpeditorlineedit.h6
2 files changed, 15 insertions, 6 deletions
diff --git a/sieveeditor/regexeditorlineedit/regexpeditorlineedit.cpp b/sieveeditor/regexeditorlineedit/regexpeditorlineedit.cpp
index 3f0acc3..aff3c5c 100644
--- a/sieveeditor/regexeditorlineedit/regexpeditorlineedit.cpp
+++ b/sieveeditor/regexeditorlineedit/regexpeditorlineedit.cpp
@@ -22,6 +22,8 @@
#include <QStackedWidget>
#include <QHBoxLayout>
+#include <QLineEdit>
+#include <QPushButton>
K_PLUGIN_FACTORY_WITH_JSON(RegexpEditorLineEditFactory, "regexepeditorlineedit.json", registerPlugin<RegexpEditorLineEdit>();
@@ -33,11 +35,16 @@ RegexpEditorLineEdit::RegexpEditorLineEdit(QWidget *parent, const QList<QVariant
{
QHBoxLayout *mainLayout = new QHBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
- mainLayout->setMargin(0);
- mStackedWidget = new QStackedWidget(this);
- mStackedWidget->setObjectName(QStringLiteral("stackedwidget"));
- mainLayout->addWidget(mStackedWidget);
+ mLineEdit = new QLineEdit(this);
+ mLineEdit->setObjectName(QStringLiteral("lineedit"));
+ mainLayout->addWidget(mLineEdit);
+
+ mRegExpEditorButton = new QPushButton(i18n("..."), this);
+ mRegExpEditorButton->setObjectName(QStringLiteral("regexpbutton"));
+ mainLayout->addWidget(mRegExpEditorButton);
+
+ //hide button ?
}
RegexpEditorLineEdit::~RegexpEditorLineEdit()
diff --git a/sieveeditor/regexeditorlineedit/regexpeditorlineedit.h b/sieveeditor/regexeditorlineedit/regexpeditorlineedit.h
index 4268aee..2cd3749 100644
--- a/sieveeditor/regexeditorlineedit/regexpeditorlineedit.h
+++ b/sieveeditor/regexeditorlineedit/regexpeditorlineedit.h
@@ -22,7 +22,8 @@
#include <QWidget>
#include <KSieveUi/AbstractRegexpEditorLineEdit>
-class QStackedWidget;
+class QLineEdit;
+class QPushButton;
class RegexpEditorLineEdit : public KSieveUi::AbstractRegexpEditorLineEdit
{
Q_OBJECT
@@ -34,7 +35,8 @@ public:
void setCode(const QString &str) Q_DECL_OVERRIDE;
QString code() const Q_DECL_OVERRIDE;
private:
- QStackedWidget *mStackedWidget;
+ QLineEdit *mLineEdit;
+ QPushButton *mRegExpEditorButton;
bool mIsRegExpMode;
};