示例#1
0
MainWindow::MainWindow( const QString& marbleDataPath, QWidget *parent )
    : KXmlGuiWindow( parent )
{
    m_part = new MarblePart( this, this, QVariantList() << marbleDataPath );

    setCentralWidget( m_part->widget() );

    insertChildClient( m_part );

    setXMLFile( "marbleui.rc" );

    setStandardToolBarMenuEnabled( true );

    createGUI( 0 );
    QList<QAction*> panelActions = m_part->controlView()->setupDockWidgets( this );
    m_part->unplugActionList( "panels_actionlist" );
    m_part->plugActionList( "panels_actionlist", panelActions );

    // Creating the plugin menus
    m_part->createInfoBoxesMenu();
    m_part->createOnlineServicesMenu();
    m_part->createRenderPluginActions();
	m_part->createFolderList();

    setAutoSaveSettings();

    connect( marbleWidget(), SIGNAL(themeChanged(QString)), 
            this, SLOT(setMapTitle()));
}
示例#2
0
KDiff3Part::KDiff3Part( QWidget *parentWidget, const char *widgetName,
                                  QObject *parent, const char *name )
    : KParts::ReadOnlyPart(parent, name)
{
    // we need an instance
    setInstance( KDiff3PartFactory::instance() );

    // this should be your custom internal widget
    m_widget = new KDiff3App( parentWidget, widgetName, this );
    
    // This hack is necessary to avoid a crash when the program terminates.
    m_bIsShell = dynamic_cast<KParts::MainWindow*>(parentWidget)!=0;

    // notify the part that this is our internal widget
    setWidget(m_widget);

    // create our actions
    //KStdAction::open(this, SLOT(fileOpen()), actionCollection());
    //KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
    //KStdAction::save(this, SLOT(save()), actionCollection());

    setXMLFile("kdiff3_part.rc");

    // we are read-write by default
    setReadWrite(true);

    // we are not modified since we haven't done anything yet
    setModified(false);
}
示例#3
0
void InvertMatrixAssistant::initActions()
{
    setXMLFile(QLatin1String("cantor_invert_matrix_assistant.rc"));
    QAction* invertmatrix=new QAction(i18n("Invert Matrix"), actionCollection());
    actionCollection()->addAction(QLatin1String("invertmatrix_assistant"), invertmatrix);
    connect(invertmatrix, &QAction::triggered, this, &InvertMatrixAssistant::requested);
}
示例#4
0
View::View(RootSection *document, MainWindow* parent)
    : QWidget(parent)
    , m_doc(document)
    , m_canvas(0)
    , m_activeSection(0)
    , m_mainWindow(parent)
    , m_cutController(0)
    , m_copyController(0)
{
    setXMLFile("braindumpview.rc");

    m_doc->viewManager()->addView(this);

    m_editPaste = actionCollection()->addAction(KStandardAction::Paste, "edit_paste", this, SLOT(editPaste()));
    m_editCut = actionCollection()->addAction(KStandardAction::Cut, "edit_cut", 0, 0);
    m_editCopy = actionCollection()->addAction(KStandardAction::Copy, "edit_copy", 0, 0);
    initGUI();
    initActions();
    loadExtensions();

    if(m_doc->sections().count() > 0) {
        setActiveSection(m_doc->sections()[0]);
    } else {
        setActiveSection(0);
    }

    m_doc->viewManager()->viewHasFocus(this);
}
示例#5
0
MainWindow::MainWindow( const QString& marbleDataPath, QWidget *parent )
    : KXmlGuiWindow( parent )
{
    m_part = new MarblePart( this, this, QVariantList() << marbleDataPath );

    setCentralWidget( m_part->widget() );

    insertChildClient( m_part );

    setXMLFile( "marbleui.rc" );

    setStandardToolBarMenuEnabled( true );

    createGUI( 0 );

    // Creating the plugin menus
    m_part->createInfoBoxesMenu();
    m_part->createOnlineServicesMenu();
	m_part->createFolderList();

    setAutoSaveSettings();

    connect( marbleWidget(), SIGNAL( themeChanged( QString ) ), 
	     this, SLOT( setMapTitle() ) );
}
示例#6
0
Kaboodle::Player::Player(QWidget *widgetParent, const char *widgetName,
                         QObject *parent, const char *name)
	: KMediaPlayer::Player(widgetParent, widgetName, parent, name)
	, engine(new Engine(this))
	, widget(new View(widgetParent, widgetName, this))
	, uncompleted(true)
	, embedded(false)
{
	setInstance(KaboodleFactory::instance());

	connect(&ticker, SIGNAL(timeout()), SLOT(tickerTimeout()));
	ticker.start(500);
	setState(Empty);

	playAction = new KAction(i18n("&Play"), 0, this, SLOT(play()), actionCollection(), "play");
	pauseAction = new KAction(i18n("&Pause"), 0, this, SLOT(pause()), actionCollection(), "pause");
	stopAction = new KAction(i18n("&Stop"), 0, this, SLOT(stop()), actionCollection(), "stop");
	loopAction = new KToggleAction(i18n("&Looping"), 0, this, SLOT(loop()), actionCollection(), "loop");
	stopAction->setEnabled(false);
	playAction->setEnabled(false);
	pauseAction->setEnabled(false);
	connect(this, SIGNAL(loopingChanged(bool)), loopAction, SLOT(setChecked(bool)));

	KParts::Part::setWidget(widget);
	setXMLFile("kaboodlepartui.rc");

	extension = new BrowserExtension(this);
	extension->setURLDropHandlingEnabled(true);
}
示例#7
0
KFDMainWindow::KFDMainWindow()
 : KParts::MainWindow()
{
	setXMLFile("kfd_mainwindow.rc");

	setupActions();
	//statusBar()->show();

	KLibFactory *factory = KLibLoader::self()->factory("libkformdesigner_part");
	if (factory)
	{
		QStringList list;
		list << "shell" << "multipleMode";
		m_part = static_cast<KParts::ReadWritePart *>( factory->create(this, "kformdesigner_part", "KParts::ReadWritePart", list) );

		if(m_part)
		{
			setCentralWidget(m_part->widget());
			createGUI(m_part);
		}
	}
	else
	{
		KMessageBox::error(this, i18n("Could not find the KFormDesigner part. Please check your installation."));
		kapp->quit();
		return;
	}

	setAutoSaveSettings();
}
示例#8
0
/*!
\brief Default constructor

This is the default constructor for the main class of the application.
It adds the standard actions and create the ATMOSphere's KCM.
*/
ATMOSphere::ATMOSphere()
    : KMainWindow( 0, "ATMOSphere" )
{
	// set the shell's ui resource file
	setXMLFile("atmosphereui.rc");
	
	KStdAction::keyBindings(this, SLOT( slotConfigureKeys() ), actionCollection() );
	KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), actionCollection());
	KStdAction::configureToolbars(this, SLOT(slotConfigureToolBars()), actionCollection());
	KStdAction::quit(this, SLOT(close()), actionCollection());
	KStdAction::preferences(this, SLOT(setup()), actionCollection());

	createGUI();
	
	kcmDialog = new KCMultiDialog( KCMultiDialog::Plain, "ATMOSphere settings", this, "kcmDialog", true);
	kcmDialog->addModule("kcmatmosphere");
	
	iv = new KIconView(this);
	setCentralWidget(iv);
	loadDevices();
	
	connect(iv, SIGNAL( executed(QIconViewItem*) ), this, SLOT(deviceOpened(QIconViewItem*)));
	
#ifdef HAVE_TFTP
	tftpServer = new TFTP::Server( QHostAddress() );
	connect(tftpServer, SIGNAL( receivedFile(QIODevice*,const QString) ), this, SLOT(tftpFileReceived(QIODevice *, const QString)));
	connect(tftpServer, SIGNAL( sentFile(QIODevice*, QString) ), this, SLOT(tftpFileSent(QIODevice *, QString)));
#endif
}
示例#9
0
AntProjectPart::AntProjectPart(QObject *parent, const char *name, const QStringList &)
  : KDevBuildTool(&data, parent, name ? name : "AntProjectPart")
{
  setInstance(AntProjectFactory::instance());

  setXMLFile("kdevantproject.rc");

  m_buildProjectAction = new KAction(i18n("&Build Project"), "make_kdevelop", Key_F8,
		                     this, SLOT(slotBuild()),
				     actionCollection(), "build_build" );
  m_buildProjectAction->setToolTip(i18n("Build project"));
  m_buildProjectAction->setWhatsThis(i18n("<b>Build project</b><p>Executes <b>ant dist</b> command to build the project."));

  KActionMenu *menu = new KActionMenu(i18n("Build &Target"),
                                      actionCollection(), "build_target" );
  menu->setToolTip(i18n("Build target"));
  menu->setWhatsThis(i18n("<b>Build target</b><p>Executes <b>ant target_name</b> command to build the specified target."));

  m_targetMenu = menu->popupMenu();

  connect(m_targetMenu, SIGNAL(activated(int)), this, SLOT(slotTargetMenuActivated(int)));
  connect(core(), SIGNAL(projectConfigWidget(KDialogBase*)), this, SLOT(projectConfigWidget(KDialogBase*)));
  connect(core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)));

  m_antOptionsWidget = 0;
}
示例#10
0
void EigenValuesAssistant::initActions()
{
    setXMLFile(QLatin1String("cantor_eigenvalues_assistant.rc"));
    QAction* eigenvalues=new QAction(i18n("Compute Eigenvalues"), actionCollection());
    actionCollection()->addAction(QLatin1String("eigenvalues_assistant"), eigenvalues);
    connect(eigenvalues, &QAction::triggered, this, &EigenValuesAssistant::requested);
}
示例#11
0
MakeViewPart::MakeViewPart(QObject *parent, const char *name, const QStringList &)
    : KDevMakeFrontend(&data, parent, name)
{
    setInstance(MakeViewFactory::instance());

    setXMLFile("kdevmakeview.rc");

    m_dcop = new KDevMakeFrontendIface(this);

    m_widget = new MakeWidget(this);
    m_widget->setIcon( SmallIcon("exec") );
    m_widget->setCaption(i18n("Messages Output"));
    QWhatsThis::add(m_widget, i18n("<b>Messages output</b><p>"
                                   "The messages window shows the output of the compiler and "
                                   "used build tools like make, ant, uic, dcopidl etc. "
                                   "For compiler error messages, click on the error message. "
                                   "This will automatically open the source file and set the "
                                   "cursor to the line that caused the compiler error/warning."));

    mainWindow()->embedOutputView(m_widget, i18n("Messages"), i18n("Compiler output messages"));

    KAction *action;
    action = new KAction( i18n("&Next Error"), Key_F4, m_widget, SLOT(nextError()),
                          actionCollection(), "view_next_error");
    action->setToolTip( i18n("Go to the next error") );
    action->setWhatsThis(i18n("<b>Next error</b><p>Switches to the file and line where the next error was reported from."));
    action = new KAction( i18n("&Previous Error"), SHIFT+Key_F4, m_widget, SLOT(prevError()),
                          actionCollection(), "view_previous_error");
    action->setToolTip( i18n("Go to the previous error") );
    action->setWhatsThis(i18n("<b>Previous error</b><p>Switches to the file and line where the previous error was reported from."));

    connect( core(), SIGNAL(stopButtonClicked(KDevPlugin*)),
             this, SLOT(slotStopButtonClicked(KDevPlugin*)) );
}
示例#12
0
PluginPart::PluginPart(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList &args)
    : KParts::ReadOnlyPart(parent, name), _widget(0), _args(args), _destructed(0L)
{
    setInstance(PluginFactory::instance());
    kdDebug(1432) << "PluginPart::PluginPart" << endl;

    // we have to keep the class name of KParts::PluginBrowserExtension
    // to let khtml find it
    _extension = static_cast< PluginBrowserExtension * >(new KParts::BrowserExtension(this));
    _liveconnect = new PluginLiveConnectExtension(this);

    // Only create this if we have no parent since the parent part is
    // responsible for "Save As" then
    if(!parent || !parent->inherits("Part"))
    {
        new KAction(i18n("&Save As..."), CTRL + Key_S, this, SLOT(saveAs()), actionCollection(), "saveDocument");
        setXMLFile("nspluginpart.rc");
    }

    // create
    _loader = NSPluginLoader::instance();
    _callback = new NSPluginCallback(this);

    // create a canvas to insert our widget
    _canvas = new PluginCanvasWidget(parentWidget, widgetName);
    //_canvas->setFocusPolicy( QWidget::ClickFocus );
    _canvas->setFocusPolicy(QWidget::WheelFocus);
    _canvas->setBackgroundMode(QWidget::NoBackground);
    setWidget(_canvas);
    _canvas->show();
    QObject::connect(_canvas, SIGNAL(resized(int, int)), this, SLOT(pluginResized(int, int)));
}
KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities )
  : KParts::ReadOnlyPart( parent, name ? name : "rich_text_part" ),
	m_capabilities( capabilities ),
	m_richTextEnabled( true )
{
	// we need an instance
	setInstance( KopeteRichTextEditPartFactory::instance() );

	editor = new KopeteTextEdit( parent );
	editor->setReadOnly( false );

	setWidget( editor );

	m_richTextAvailable = (
		m_capabilities & Kopete::Protocol::RichFormatting ||
		m_capabilities & Kopete::Protocol::Alignment ||
		m_capabilities & Kopete::Protocol::RichFont ||
		m_capabilities & Kopete::Protocol::RichColor
	);

	createActions();

	setXMLFile( "kopeterichtexteditpartfull.rc" );
	enableRichText->setEnabled( m_richTextAvailable );
	enableRichText->setChecked( m_richTextAvailable );
	slotSetRichTextEnabled( m_richTextAvailable );

	//Set colors, font
	readConfig();
}
示例#14
0
ReplacePart::ReplacePart(QObject *parent, const char *name, const QStringList& )
        : KDevPlugin( &data, parent, name ? name : "ReplacePart" )
{
    setInstance(ReplaceFactory::instance());
    setXMLFile("kdevpart_replace.rc");

    m_widget = new ReplaceWidget(this);
    m_widget->setIcon( SmallIcon("filefind") );
    m_widget->setCaption(i18n("Replace"));

    QWhatsThis::add
        (m_widget, i18n("<b>Replace</b><p>"
                        "This window shows a preview of a string replace "
                        "operation. Uncheck a line to exclude that replacement. "
                        "Uncheck a file to exclude the whole file from the "
                        "operation. "
                        "Clicking on a line in the list will automatically "
                        "open the corresponding source file and set the "
                        "cursor to the line with the match." ));

    mainWindow()->embedOutputView( m_widget, i18n("Replace"), i18n("Project wide string replacement") );
    mainWindow()->setViewAvailable( m_widget, false );

    KAction * action = new KAction(i18n("Find-Select-Replace..."), 0,
                                   CTRL+SHIFT+Key_R, this, SLOT(slotReplace()), actionCollection(), "edit_replace_across");
    action->setToolTip( i18n("Project wide string replacement") );
    action->setWhatsThis( i18n("<b>Find-Select-Replace</b><p>"
                               "Opens the project wide string replacement dialog. There you "
                               "can enter a string or a regular expression which is then "
                               "searched for within all files in the locations "
                               "you specify. Matches will be displayed in the <b>Replace</b> window, you "
                               "can replace them with the specified string, exclude them from replace operation or cancel the whole replace.") );

	connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)), this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
}
示例#15
0
文件: nmeagps.cpp 项目: UpWind/devel
QString NMEAGPS::loadFrom(SettingsManager &sm){
    QString fileVer = CorePlugin::loadFrom(sm);
    boat.fileName = sm.loadProperty("polarXml", "");
    QFile file(boat.fileName);
    if(file.exists())
        setXMLFile(false);
    return fileVer;
}
示例#16
0
CAuView::CAuView(KoPart *part, KWDocument *document, QWidget *parent)
    :KWView(part, document, parent)
{
        setComponentName(CAuFactory::componentData().componentName(), CAuFactory::componentData().componentDisplayName());
        setXMLFile("author.rc");

        setupActions();
}
示例#17
0
NowListening::NowListening(QObject *parent, const QList<QVariant> &)
    : Choqok::Plugin(QLatin1String("choqok_nowlistening"), parent)
{
    QAction *action = new QAction(QIcon::fromTheme(QLatin1String("media-playback-start")), i18n("Now Listening"), this);
    actionCollection()->addAction(QLatin1String("nowListening"), action);
    connect(action, SIGNAL(triggered(bool)), SLOT(slotPrepareNowListening()));
    setXMLFile(QLatin1String("nowlisteningui.rc"));
}
示例#18
0
KPlatoScriptingPart::KPlatoScriptingPart(QObject* parent, const QStringList& args)
    : KoScriptingPart(new Scripting::Module(parent), args)
    , d(new Private())
{
    //setComponentData(ScriptingPart::componentData());
    setXMLFile(KStandardDirs::locate("data", "plan/viewplugins/scripting.rc"), true);
    kDebug(planScriptingDebugArea()) <<"PlanScripting plugin. Class:" << metaObject()->className() <<", Parent:" <<(parent?parent->metaObject()->className():"0");

}
示例#19
0
TestPlugin::TestPlugin(Kontact::Core *_core, const char *name, const QStringList &)
    : Kontact::Plugin(_core, _core, name)
{
    setInstance(TestPluginFactory::instance());

    insertNewAction(new KAction("Test", 0, this, SLOT(slotTestMenu()), actionCollection(), "edit_test"));

    setXMLFile("kptestplugin.rc");
}
示例#20
0
文件: docpart.cpp 项目: fagu/kileip
DocumentationViewer::DocumentationViewer(QWidget *parent) : KHTMLPart(parent, parent, BrowserViewGUI)
{
	m_hpos = 0;
	QString rc = KGlobal::dirs()->findResource("appdata", "docpartui.rc");
	setXMLFile(rc);
	KStandardAction::back(this, SLOT(back()), (QObject*)actionCollection());
	KStandardAction::forward(this, SLOT(forward()), (QObject*)actionCollection());
	KStandardAction::home(this, SLOT(home()), (QObject*)actionCollection());
}
示例#21
0
文件: docpart.cpp 项目: KDE/kile
DocumentationViewer::DocumentationViewer(QWidget *parent) : KHTMLPart(parent, parent, BrowserViewGUI)
{
	m_hpos = 0;
	QString rc = QStandardPaths::locate(QStandardPaths::DataLocation, "docpartui.rc");
	setXMLFile(rc);
	KStandardAction::back(this, SLOT(back()), (QObject*)actionCollection());
	KStandardAction::forward(this, SLOT(forward()), (QObject*)actionCollection());
	KStandardAction::home(this, SLOT(home()), (QObject*)actionCollection());
}
示例#22
0
CsvExporterPlugin::CsvExporterPlugin() :
    KMyMoneyPlugin::Plugin(nullptr, "csvexport"/*must be the same as X-KDE-PluginInfo-Name*/)
{
    setComponentName("kmm_csvexport", i18n("CSV exporter"));
    setXMLFile("kmm_csvexport.rc");
    createActions();
    // For information, announce that we have been loaded.
    qDebug("KMyMoney csvexport plugin loaded");
}
示例#23
0
KPlatoScriptingPart::KPlatoScriptingPart(QObject *parent, const QVariantList &args)
    : KoScriptingPart(new Scripting::Module(parent))
{
    Q_UNUSED(args);
    //setComponentData(ScriptingPart::componentData());
    setXMLFile(QStandardPaths::locate(QStandardPaths::GenericDataLocation, "plan/viewplugins/scripting.rc"), true);
    debugPlanScripting <<"PlanScripting plugin. Class:" << metaObject()->className() <<", Parent:" <<(parent?parent->metaObject()->className():"0");

}
示例#24
0
RefinePathPlugin::RefinePathPlugin(QObject *parent, const QVariantList &)
    : QObject(parent)
{
    setXMLFile(KStandardDirs::locate("data", "karbon/plugins/RefinePathPlugin.rc"), true);
    QAction *actionRefinePath  = new QAction(koIcon("effect_refine"), i18n("&Refine Path..."), this);
    actionCollection()->addAction("path_refine", actionRefinePath);
    connect(actionRefinePath, SIGNAL(triggered()), this, SLOT(slotRefinePath()));

    m_RefinePathDlg = new RefinePathDlg(qobject_cast<QWidget*>(parent));
}
示例#25
0
	void MediaPlayerPlugin::load()
	{
		LogSystemManager::instance().registerSystem(i18n("Media Player"),SYS_MPL);
		CoreInterface* core = getCore();
		act = new MediaPlayerActivity(core,actionCollection(),0);
		getGUI()->addActivity(act);
		setXMLFile("ktmediaplayerpluginui.rc");
		act->enableActions(0);
		act->loadState(KGlobal::config());
	}
示例#26
0
RKConsolePart::RKConsolePart (RKConsole *console) : KParts::Part (0) {
	RK_TRACE (APP);

	KInstance* instance = new KInstance ("rkward");
	setInstance (instance);

	setWidget (console);

	setXMLFile ("rkconsolepart.rc");
}
    MagnetGeneratorPlugin::MagnetGeneratorPlugin(QObject* parent, const QStringList& args) : Plugin(parent)
    {
        Q_UNUSED(args);
        pref = 0;
        generate_magnet_action = new KAction(KIcon("kt-magnet"), i18n("Copy Magnet URI"), this);
        connect(generate_magnet_action, SIGNAL(triggered()), this, SLOT(generateMagnet()));
        actionCollection()->addAction("generate_magnet", generate_magnet_action);
        setXMLFile("ktmagnetgeneratorpluginui.rc");

    }
示例#28
0
文件: kwrite.cpp 项目: cmacq2/kate
KWrite::KWrite(KTextEditor::Document *doc)
    : m_view(0)
    , m_recentFiles(0)
    , m_paShowPath(0)
    , m_paShowMenuBar(0)
    , m_paShowStatusBar(0)
    , m_activityResource(0)
{
    if (!doc) {
        doc = KTextEditor::Editor::instance()->createDocument(0);

        // enable the modified on disk warning dialogs if any
        if (qobject_cast<KTextEditor::ModificationInterface *>(doc)) {
            qobject_cast<KTextEditor::ModificationInterface *>(doc)->setModifiedOnDiskWarning(true);
        }

        docList.append(doc);
    }

    m_view = doc->createView(this);

    setCentralWidget(m_view);

    setupActions();

    // signals for the statusbar
    connect(m_view->document(), &KTextEditor::Document::modifiedChanged, this, &KWrite::modifiedChanged);
    connect(m_view->document(), SIGNAL(documentNameChanged(KTextEditor::Document*)), this, SLOT(documentNameChanged()));
    connect(m_view->document(), SIGNAL(readWriteChanged(KTextEditor::Document*)), this, SLOT(documentNameChanged()));
    connect(m_view->document(), SIGNAL(documentUrlChanged(KTextEditor::Document*)), this, SLOT(urlChanged()));

    setAcceptDrops(true);
    connect(m_view, SIGNAL(dropEventPass(QDropEvent*)), this, SLOT(slotDropEvent(QDropEvent*)));

    setXMLFile(QStringLiteral("kwriteui.rc"));
    createShellGUI(true);
    guiFactory()->addClient(m_view);

    // FIXME: make sure the config dir exists, any idea how to do it more cleanly?
    QDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)).mkpath(QStringLiteral("."));

    // call it as last thing, must be sure everything is already set up ;)
    setAutoSaveSettings();

    readConfig();

    winList.append(this);

    documentNameChanged();
    show();

    // give view focus
    m_view->setFocus(Qt::OtherFocusReason);
}
示例#29
0
RoundCornersPlugin::RoundCornersPlugin(QObject * parent, const QVariantList &)
{
    setXMLFile(KStandardDirs::locate("data", "karbon/plugins/RoundCornersPlugin.rc"));

    QAction *actionRoundCorners  = new QAction(koIcon("effect_roundcorners"), i18n("&Round Corners..."), this);
    actionCollection()->addAction("path_round_corners", actionRoundCorners);
    connect(actionRoundCorners, SIGNAL(triggered()), this, SLOT(slotRoundCorners()));

    m_roundCornersDlg = new RoundCornersDlg(qobject_cast<QWidget*>(parent));
    m_roundCornersDlg->setRadius(10.0);
}
示例#30
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);
}