KDevelop API Documentation

distpart_part.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2004 by ian reinhart geiser                             *
00003  *   geiseri@kde.org                                                       *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
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     //QWhatsThis::add(m_widget, i18n("This will help users package and publish their software."));
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     // Package types
00063     //RpmPackage = new SpecSupport(this);
00064     //LsmPackage = new LsmSupport(this);
00065 }
00066 
00067 
00068 DistpartPart::~DistpartPart() {
00069     kdDebug(9007) << "DistpartPart::~DistpartPart()" << endl;
00070     delete m_dialog;
00071     //delete RpmPackage;
00072     //delete LsmPackage;
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"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:54 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003