Commit ad13096f authored by Laurent Montel's avatar Laurent Montel 😁

Port to slidecontainer

parent 2821131b
......@@ -32,6 +32,7 @@
#include "pimcommon/texteditor/plaintexteditor/plaintexteditorwidget.h"
#include "pimcommon/texteditor/commonwidget/textgotolinewidget.h"
#include "pimcommon/widgets/splittercollapser.h"
#include "pimcommon/widgets/slidecontainer.h"
#include <ksieve/parser.h>
#include <ksieve/error.h>
......@@ -50,6 +51,8 @@
#include <errno.h>
using namespace KSieveUi;
SieveEditorTextModeWidget::SieveEditorTextModeWidget(QWidget *parent)
......@@ -96,9 +99,13 @@ SieveEditorTextModeWidget::SieveEditorTextModeWidget(QWidget *parent)
textEditLayout->addWidget(mGoToLine);
connect(mGoToLine, SIGNAL(goToLine(int)), this, SLOT(slotGoToLine(int)));
mSliderContainer = new PimCommon::SlideContainer(this);
mFindBar = new PimCommon::PlainTextEditFindBar( mTextEdit, textEditWidget );
mFindBar->setHideWhenClose(false);
connect(mFindBar, SIGNAL(hideFindBar()), mSliderContainer, SLOT(slideOut()));
connect(mFindBar, SIGNAL(displayMessageIndicator(QString)),mTextEdit, SLOT(slotDisplayMessageIndicator(QString)));
textEditLayout->addWidget(mFindBar);
mSliderContainer->setContent(mFindBar);
textEditLayout->addWidget(mSliderContainer);
mSieveEditorWarning = new SieveEditorWarning;
textEditLayout->addWidget(mSieveEditorWarning);
......@@ -220,6 +227,7 @@ void SieveEditorTextModeWidget::autoGenerateScripts()
void SieveEditorTextModeWidget::slotFind()
{
mSliderContainer->slideIn();
if ( mTextEdit->textCursor().hasSelection() )
mFindBar->setText( mTextEdit->textCursor().selectedText() );
mTextEdit->moveCursor(QTextCursor::Start);
......
......@@ -28,6 +28,7 @@ namespace PimCommon {
class PlainTextEditFindBar;
class PlainTextEditor;
class TextGoToLineWidget;
class SlideContainer;
}
namespace KSieveUi {
......@@ -92,6 +93,7 @@ private:
SieveEditorParsingMissingFeatureWarning *mSieveParsingWarning;
SieveEditorTabWidget *mTabWidget;
PimCommon::TextGoToLineWidget *mGoToLine;
PimCommon::SlideContainer *mSliderContainer;
};
}
......
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