20#include <tqradiobutton.h>
21#include <tqcombobox.h>
25#include "kis_canvas_controller.h"
26#include "kis_canvas_subject.h"
27#include "wdgselectionoptions.h"
28#include "kis_selection_options.h"
32#include "kis_selection.h"
33#include "kis_paint_device.h"
35KisSelectionOptions::KisSelectionOptions(TQWidget *parent, KisCanvasSubject * subject)
39 m_page = new WdgSelectionOptions( this);
42 TQVBoxLayout * l = new TQVBoxLayout( this);
45 connect(m_page->cmbAction, TQ_SIGNAL(activated( int)), this, TQ_SIGNAL(actionChanged( int)));
48KisSelectionOptions::~KisSelectionOptions()
52int KisSelectionOptions::action()
54 return m_page->cmbAction->currentItem();
57void KisSelectionOptions::slotActivated()
60 if (!m_subject) return;
61 KisImageSP img = m_subject->currentImg();
63 KisPaintDeviceSP dev = img->activeDevice();
66 if (dev->hasSelection()) {
70#include "kis_selection_options.moc"
KisCanvasSubject is part of the Observer pattern.
|