KDevelop API Documentation

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 "quickopenclassdialog.h"
00023 #include "quickopenfunctiondialog.h"
00024 #include "quickopenfiledialog.h"
00025 
00026 #include <kaction.h>
00027 #include <kiconloader.h>
00028 #include <klocale.h>
00029 #include <kdevgenericfactory.h>
00030 
00031 #include <kmainwindow.h>
00032 
00033 #include <kdevmainwindow.h>
00034 #include <kdevcore.h>
00035 #include <kdevpartcontroller.h>
00036 #include <kdevproject.h>
00037 
00038 typedef KDevGenericFactory<QuickOpenPart> QuickOpenFactory;
00039 static const KAboutData data("kdevquickopen", I18N_NOOP("Quick Open..."), "1.0");
00040 K_EXPORT_COMPONENT_FACTORY( libkdevquickopen, QuickOpenFactory( &data ) )
00041 
00042 QuickOpenPart::QuickOpenPart(QObject *parent, const char *name, const QStringList& )
00043     : KDevPlugin("KDevPart", "kdevpart", parent, name ? name : "QuickOpenPart" )
00044 {
00045     setInstance(QuickOpenFactory::instance());
00046     setXMLFile("kdevpart_quickopen.rc");
00047 
00048     m_actionQuickOpen = new KAction( i18n("Quick Open File..."), CTRL + ALT + Key_O,
00049                        this, SLOT(slotQuickFileOpen()),
00050                        actionCollection(), "quick_open" );
00051     m_actionQuickOpen->setToolTip(i18n("Quick open file in project"));
00052     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."));
00053 
00054     m_actionQuickOpenClass = new KAction( i18n("Quick Open Class..."), CTRL + ALT + Key_C,
00055                           this, SLOT(slotQuickOpenClass()),
00056                           actionCollection(), "quick_open_class" );
00057     m_actionQuickOpenClass->setToolTip(i18n("Find class in project"));
00058     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."));
00059 
00060     m_actionFunctionOpen = new KAction( i18n("Quick Open Method..."), CTRL + ALT + Key_M, this, SLOT(slotQuickOpenFunction()), actionCollection(), "quick_open_function" );
00061     m_actionFunctionOpen->setToolTip(i18n("Quick open function in project"));
00062 
00063     connect( core(), SIGNAL(projectOpened()), this, SLOT(slotProjectOpened()) );
00064     connect( core(), SIGNAL(projectClosed()), this, SLOT(slotProjectClosed()) );
00065 }
00066 
00067 
00068 QuickOpenPart::~QuickOpenPart()
00069 {
00070 }
00071 
00072 void QuickOpenPart::slotProjectOpened( )
00073 {
00074 }
00075 
00076 void QuickOpenPart::slotProjectClosed( )
00077 {
00078 }
00079 
00080 void QuickOpenPart::slotQuickFileOpen( )
00081 {
00082     QuickOpenFileDialog dlg( this, mainWindow()->main() );
00083     dlg.exec();
00084 }
00085 
00086 void QuickOpenPart::slotQuickOpenClass( )
00087 {
00088     QuickOpenClassDialog dlg( this, mainWindow()->main() );
00089     dlg.exec();
00090 }
00091 
00092 void QuickOpenPart::slotQuickOpenFunction()
00093 {
00094     QuickOpenFunctionDialog dlg( this, mainWindow()->main() );
00095     dlg.exec();
00096 }
00097 
00098 #include "quickopen_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 Tue Feb 22 09:22:41 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003