distpart_part.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "distpart_part.h"
00021
00022 #include <qwhatsthis.h>
00023
00024 #include <kiconloader.h>
00025 #include <klocale.h>
00026 #include <kdevgenericfactory.h>
00027 #include <kdebug.h>
00028
00029 #include "kdevcore.h"
00030
00031 #include "distpart_widget.h"
00032
00033 #include <kdialogbase.h>
00034
00035 typedef KDevGenericFactory<DistpartPart> DistpartFactory;
00036 static const KAboutData data("kdevdistpart", I18N_NOOP("Distribution & Publishing"), "1.0");
00037 K_EXPORT_COMPONENT_FACTORY( libkdevdistpart, DistpartFactory( &data ) )
00038
00039 DistpartPart::DistpartPart(QObject *parent, const char *name, const QStringList &)
00040 : KDevPlugin("Distribution", "dist", parent, name ? name : "DistpartPart") {
00041
00042 kdDebug(9007) << "DistpartPart::DistpartPart()" << endl;
00043 setInstance(DistpartFactory::instance());
00044
00045 setXMLFile("kdevpart_distpart.rc");
00046
00047 m_action = new KAction( i18n("Distribution && Publishing"), "package", 0,
00048 this, SLOT(show()),
00049 actionCollection(), "make_dist" );
00050
00051 m_action->setStatusText(i18n("Make source and binary distribution"));
00052 m_action->setWhatsThis(i18n("<b>Project distribution & publishing</b><p>Helps users package and publish their software."));
00053
00054
00055 m_dlg = new KDialogBase( widget() , "dist_part", false, i18n("Distribution & Publishing"), KDialogBase::Ok|KDialogBase::Cancel);
00056
00057 m_dialog = new DistpartDialog(this, m_dlg );
00058 m_dlg->setMainWidget(m_dialog);
00059
00060 connect( m_dlg, SIGNAL(okClicked()), m_dialog, SLOT(slotokayPushButtonPressed()));
00061 connect( m_dlg, SIGNAL(cancelClicked()), m_dialog, SLOT(slotcancelPushButtonPressed()));
00062
00063
00064
00065 }
00066
00067
00068 DistpartPart::~DistpartPart() {
00069 kdDebug(9007) << "DistpartPart::~DistpartPart()" << endl;
00070 delete m_dialog;
00071
00072
00073 }
00074
00075 void DistpartPart::show() {
00076 m_dlg->exec();
00077 }
00078
00079 void DistpartPart::hide() {
00080 m_dlg->cancel();
00081 }
00082
00083 #include "distpart_part.moc"
This file is part of the documentation for KDevelop Version 3.1.2.