KDevelop API Documentation

parts/quickopen/quickopen_part.cpp

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2003 Roberto Raggi (roberto@kdevelop.org) 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 * Boston, MA 02111-1307, USA. 00018 * 00019 */ 00020 00021 #include "quickopen_part.h" 00022 #include "quickopendialog.h" 00023 #include "quickopenclassdialog.h" 00024 00025 #include <kaction.h> 00026 #include <kiconloader.h> 00027 #include <klocale.h> 00028 #include <kdevgenericfactory.h> 00029 00030 #include <kmainwindow.h> 00031 00032 #include <kdevmainwindow.h> 00033 #include <kdevcore.h> 00034 #include <kdevpartcontroller.h> 00035 #include <kdevproject.h> 00036 00037 typedef KDevGenericFactory<QuickOpenPart> QuickOpenFactory; 00038 static const KAboutData data("kdevquickopen", I18N_NOOP("Quick Open..."), "1.0"); 00039 K_EXPORT_COMPONENT_FACTORY( libkdevquickopen, QuickOpenFactory( &data ) ) 00040 00041 QuickOpenPart::QuickOpenPart(QObject *parent, const char *name, const QStringList& ) 00042 : KDevPlugin("KDevPart", "kdevpart", parent, name ? name : "QuickOpenPart" ) 00043 { 00044 setInstance(QuickOpenFactory::instance()); 00045 setXMLFile("kdevpart_quickopen.rc"); 00046 00047 m_actionQuickOpen = new KAction( i18n("Quick Open..."), CTRL + SHIFT + Key_O, 00048 this, SLOT(slotQuickOpen()), 00049 actionCollection(), "quick_open" ); 00050 m_actionQuickOpen->setToolTip(i18n("Quick open file in project")); 00051 m_actionQuickOpen->setWhatsThis(i18n("<b>Quick open</b><p>Provides a file name input form with completion listbox to quickly open file in a project.")); 00052 00053 m_actionQuickOpenClass = new KAction( i18n("Find Class..."), CTRL + ALT + Key_C, 00054 this, SLOT(slotQuickOpenClass()), 00055 actionCollection(), "quick_open_class" ); 00056 m_actionQuickOpenClass->setToolTip(i18n("Find class in project")); 00057 m_actionQuickOpenClass->setWhatsThis(i18n("<b>Find class</b><p>Provides a class name input form with completion listbox to quickly open a file where the class is defined.")); 00058 00059 connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) ); 00060 connect( core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) ); 00061 } 00062 00063 00064 QuickOpenPart::~QuickOpenPart() 00065 { 00066 } 00067 00068 void QuickOpenPart::slotProjectOpened( ) 00069 { 00070 } 00071 00072 void QuickOpenPart::slotProjectClosed( ) 00073 { 00074 } 00075 00076 void QuickOpenPart::slotQuickOpen( ) 00077 { 00078 QuickOpenDialog dlg( this, mainWindow()->main() ); 00079 dlg.exec(); 00080 } 00081 00082 void QuickOpenPart::slotQuickOpenClass( ) 00083 { 00084 QuickOpenClassDialog dlg( this, mainWindow()->main() ); 00085 dlg.exec(); 00086 } 00087 00088 00089 #include "quickopen_part.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Oct 6 17:39:12 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003