appwizardpart.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <qdir.h>
00013 #include <qwidget.h>
00014 #include <kdebug.h>
00015 #include <klocale.h>
00016 #include <kmessagebox.h>
00017 #include <kprocess.h>
00018 #include <kdevcore.h>
00019 #include <kgenericfactory.h>
00020 #include <kstandarddirs.h>
00021 #include <kaction.h>
00022 #include <qmessagebox.h>
00023
00024 #include "importdlg.h"
00025 #include "appwizarddlg.h"
00026 #include "appwizardpart.h"
00027 #include "appwizardfactory.h"
00028 #include <kdevmakefrontend.h>
00029 #include <kdevpartcontroller.h>
00030 #include <kdevlanguagesupport.h>
00031 #include <codemodel.h>
00032
00033 AppWizardPart::AppWizardPart(QObject *parent, const char *name, const QStringList &)
00034 : KDevPlugin("AppWizard", "appwizard", parent, name ? name : "AppWizardPart")
00035 {
00036 setInstance(AppWizardFactory::instance());
00037 setXMLFile("kdevappwizard.rc");
00038
00039 KAction *action;
00040
00041 action = new KAction( i18n("&New Project..."), "window_new", 0,
00042 this, SLOT(slotNewProject()),
00043 actionCollection(), "project_new" );
00044 action->setToolTip( i18n("Generate a new project from a template") );
00045 action->setWhatsThis( i18n("<b>New project</b><p>"
00046 "This starts KDevelop's application wizard. "
00047 "It helps you to generate a skeleton for your "
00048 "application from a set of templates.") );
00049
00050 action = new KAction( i18n("&Import Existing Project..."),"wizard", 0,
00051 this, SLOT(slotImportProject()),
00052 actionCollection(), "project_import" );
00053 action->setToolTip( i18n("Import existing project") );
00054 action->setWhatsThis( i18n("<b>Import existing project</b><p>Creates a project file for a given directory.") );
00055 }
00056
00057
00058 AppWizardPart::~AppWizardPart()
00059 {
00060 }
00061
00062
00063 void AppWizardPart::slotNewProject()
00064 {
00065 kdDebug(9010) << "new project" << endl;
00066 AppWizardDialog dlg(this, 0, "app wizard");
00067 dlg.templates_listview->setFocus();
00068 dlg.exec();
00069 }
00070
00071
00072 void AppWizardPart::slotImportProject()
00073 {
00074 ImportDialog dlg(this, 0, "import dialog");
00075 dlg.exec();
00076 }
00077
00078 #include "appwizardpart.moc"
00079
00080
This file is part of the documentation for KDevelop Version 3.1.2.