Commit 3e4e0f80 authored by Thomas Hartmann's avatar Thomas Hartmann

QuickToolBar: integrate BorderImage

parent 7c67c2be
......@@ -110,11 +110,13 @@ ContextPaneWidget::ContextPaneWidget(QWidget *parent) : DragWidget(parent), m_cu
QWidget *fontWidget = createFontWidget();
m_currentWidget = fontWidget;
QWidget *imageWidget = createImageWidget();
QWidget *borderImageWidget = createBorderImageWidget();
QWidget *rectangleWidget = createRectangleWidget();
QWidget *easingWidget = createEasingWidget();
layout->addWidget(fontWidget, 0, 1, 2, 1);
layout->addWidget(easingWidget, 0, 1, 2, 1);
layout->addWidget(imageWidget, 0, 1, 2, 1);
layout->addWidget(borderImageWidget, 0, 1, 2, 1);
layout->addWidget(rectangleWidget, 0, 1, 2, 1);
setAutoFillBackground(true);
......@@ -219,6 +221,7 @@ void ContextPaneWidget::setPath(const QString &path)
bool ContextPaneWidget::setType(const QString &typeName)
{
m_imageWidget->hide();
m_borderImageWidget->hide();
m_textWidget->hide();
m_rectangleWidget->hide();
m_easingWidget->hide();
......@@ -250,6 +253,14 @@ bool ContextPaneWidget::setType(const QString &typeName)
resize(sizeHint());
return true;
}
if (typeName.contains("BorderImage")) {
m_currentWidget = m_borderImageWidget;
m_borderImageWidget->show();
resize(sizeHint());
return true;
}
if (typeName.contains("Image")) {
m_currentWidget = m_imageWidget;
m_imageWidget->show();
......@@ -330,6 +341,17 @@ QWidget *ContextPaneWidget::createImageWidget()
return m_imageWidget;
}
QWidget *ContextPaneWidget::createBorderImageWidget()
{
m_borderImageWidget = new ContextPaneWidgetImage(this, true);
connect(m_borderImageWidget, SIGNAL(propertyChanged(QString,QVariant)), this, SIGNAL(propertyChanged(QString,QVariant)));
connect(m_borderImageWidget, SIGNAL(removeProperty(QString)), this, SIGNAL(removeProperty(QString)));
connect(m_borderImageWidget, SIGNAL(removeAndChangeProperty(QString,QString,QVariant, bool)), this, SIGNAL(removeAndChangeProperty(QString,QString,QVariant, bool)));
return m_borderImageWidget;
}
QWidget *ContextPaneWidget::createRectangleWidget()
{
m_rectangleWidget = new ContextPaneWidgetRectangle(this);
......
......@@ -74,6 +74,7 @@ protected:
QWidget *createFontWidget();
QWidget *createEasingWidget();
QWidget *createImageWidget();
QWidget *createBorderImageWidget();
QWidget *createRectangleWidget();
private:
......@@ -81,6 +82,7 @@ private:
ContextPaneTextWidget *m_textWidget;
EasingContextPane *m_easingWidget;
ContextPaneWidgetImage *m_imageWidget;
ContextPaneWidgetImage *m_borderImageWidget;
ContextPaneWidgetRectangle *m_rectangleWidget;
QWeakPointer<BauhausColorDialog> m_bauhausColorDialog;
QString m_colorName;
......
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