Commit 4d6c7620 authored by Laurent Montel's avatar Laurent Montel 😁

Improve layout

parent 682ffaa7
......@@ -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()
......
......@@ -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;
};
......
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