krita
kis_selection_options.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <qwidget.h>
00020 #include <qradiobutton.h>
00021 #include <qcombobox.h>
00022 #include <kcolorbtn.h>
00023 #include <qlayout.h>
00024
00025 #include "kis_canvas_controller.h"
00026 #include "kis_canvas_subject.h"
00027 #include "wdgselectionoptions.h"
00028 #include "kis_selection_options.h"
00029 #include "kis_types.h"
00030 #include "kis_layer.h"
00031 #include "kis_image.h"
00032 #include "kis_selection.h"
00033 #include "kis_paint_device.h"
00034
00035 KisSelectionOptions::KisSelectionOptions(QWidget *parent, KisCanvasSubject * subject)
00036 : super(parent),
00037 m_subject(subject)
00038 {
00039 m_page = new WdgSelectionOptions(this);
00040 Q_CHECK_PTR(m_page);
00041
00042 QVBoxLayout * l = new QVBoxLayout(this);
00043 l->addWidget(m_page);
00044
00045 connect(m_page->cmbAction, SIGNAL(activated(int)), this, SIGNAL(actionChanged(int)));
00046 }
00047
00048 KisSelectionOptions::~KisSelectionOptions()
00049 {
00050 }
00051
00052 int KisSelectionOptions::action()
00053 {
00054 return m_page->cmbAction->currentItem();
00055 }
00056
00057 void KisSelectionOptions::slotActivated()
00058 {
00059
00060 if (!m_subject) return;
00061 KisImageSP img = m_subject->currentImg();
00062 if (!img) return;
00063 KisPaintDeviceSP dev = img->activeDevice();
00064 if (!dev) return;
00065
00066 if (dev->hasSelection()) {
00067 }
00068 }
00069
00070 #include "kis_selection_options.moc"
|