FlattenPathPlugin::FlattenPathPlugin( QWidget *parent, const QStringList & ) : Plugin( parent/*, name*/ ) { KAction *actionFlattenPath = new KAction(KIcon("14_flatten"), i18n("&Flatten Path..."), this); actionCollection()->addAction("path_flatten", actionFlattenPath ); connect(actionFlattenPath, SIGNAL(triggered()), this, SLOT(slotFlattenPath())); m_flattenPathDlg = new FlattenDlg( parent ); m_flattenPathDlg->setFlatness( 10.0 ); }
FlattenPathPlugin::FlattenPathPlugin(QObject *parent, const QVariantList &) { setXMLFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "karbon/plugins/FlattenPathPlugin.rc"), true); QAction *actionFlattenPath = new QAction(koIcon("effect_flatten"), i18n("&Flatten Path..."), this); actionCollection()->addAction("path_flatten", actionFlattenPath); connect(actionFlattenPath, SIGNAL(triggered()), this, SLOT(slotFlattenPath())); m_flattenPathDlg = new FlattenDlg(qobject_cast<QWidget *>(parent)); m_flattenPathDlg->setFlatness(10.0); }