uichooser_part.cpp
Go to the documentation of this file.00001 #include "uichooser_part.h"
00002
00003 #include <qvbox.h>
00004
00005 #include <kdialogbase.h>
00006 #include <kdevgenericfactory.h>
00007 #include <kiconloader.h>
00008 #include <klocale.h>
00009 #include <kdevcore.h>
00010 #include <configwidgetproxy.h>
00011
00012 #include "uichooser_widget.h"
00013
00014 #define UICHOOSERSETTINGSPAGE 1
00015
00016 typedef KDevGenericFactory<UIChooserPart> UIChooserFactory;
00017 static const KAboutData data("kdevuichooser", I18N_NOOP("User Interface"), "1.0");
00018 K_EXPORT_COMPONENT_FACTORY( libkdevuichooser, UIChooserFactory( &data ) )
00019
00020 UIChooserPart::UIChooserPart(QObject *parent, const char *name, const QStringList &)
00021 : KDevPlugin( "UIChooser", "view_choose", parent, name ? name : "UIChooserPart")
00022 {
00023 setInstance(UIChooserFactory::instance());
00024
00025 _configProxy = new ConfigWidgetProxy( core() );
00026 _configProxy->createGlobalConfigPage( i18n("User Interface"), UICHOOSERSETTINGSPAGE, icon() );
00027 connect( _configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )),
00028 this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) );
00029 }
00030
00031
00032 UIChooserPart::~UIChooserPart()
00033 {
00034 }
00035
00036 void UIChooserPart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber )
00037 {
00038 kdDebug() << k_funcinfo << endl;
00039
00040 if ( pagenumber == UICHOOSERSETTINGSPAGE )
00041 {
00042 UIChooserWidget * w = new UIChooserWidget( this, page, "UIChooser widget" );
00043 connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
00044 }
00045 }
00046
00047
00048
00049
00050 #include "uichooser_part.moc"
This file is part of the documentation for KDevelop Version 3.1.2.