krita
kis_tool_shape.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <qwidget.h>
00020 #include <qlayout.h>
00021 #include <qcombobox.h>
00022 #include <qlabel.h>
00023
00024 #include <kdebug.h>
00025 #include <klocale.h>
00026
00027 #include "kis_tool_shape.h"
00028 #include "wdgshapeoptions.h"
00029
00030 KisToolShape::KisToolShape(const QString& UIName) : super(UIName)
00031 {
00032 m_shapeOptionsWidget = 0;
00033 m_optionLayout = 0;
00034 }
00035
00036 KisToolShape::~KisToolShape()
00037 {
00038 }
00039
00040 QWidget* KisToolShape::createOptionWidget(QWidget* parent)
00041 {
00042 QWidget *widget = super::createOptionWidget(parent);
00043
00044 m_shapeOptionsWidget = new WdgGeometryOptions(0);
00045 Q_CHECK_PTR(m_shapeOptionsWidget);
00046
00047 m_optionLayout = new QGridLayout(widget, 2, 1);
00048
00049
00050 m_shapeOptionsWidget->cmbFill->reparent(widget, QPoint(0,0), true);
00051 m_shapeOptionsWidget->textLabel3->reparent(widget, QPoint(0,0), true);
00052 addOptionWidgetOption(m_shapeOptionsWidget->cmbFill, m_shapeOptionsWidget->textLabel3);
00053
00054 return widget;
00055 }
00056
00057 KisPainter::FillStyle KisToolShape::fillStyle(void)
00058 {
00059 if (m_shapeOptionsWidget) {
00060 return static_cast<KisPainter::FillStyle>(m_shapeOptionsWidget->cmbFill->currentItem());
00061 } else {
00062 return KisPainter::FillStyleNone;
00063 }
00064 }
00065
00066 #include "kis_tool_shape.moc"
00067
|