haskellsupport_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 #include <qwhatsthis.h>
00019 #include <qdir.h>
00020 #include <qtimer.h>
00021 #include <kiconloader.h>
00022 #include <klocale.h>
00023 #include <kdevgenericfactory.h>
00024 #include <kdebug.h>
00025 #include <kapplication.h>
00026 #include <kstatusbar.h>
00027
00028
00029
00030 #include "kdevpartcontroller.h"
00031 #include "kdevproject.h"
00032 #include "kdevcore.h"
00033 #include "kdevmainwindow.h"
00034
00035 #include "haskellsupport_part.h"
00036
00037 typedef KDevGenericFactory<HaskellSupportPart> HaskellSupportFactory;
00038 static const KAboutData data("kdevhaskellsupport", I18N_NOOP("Language"), "1.0");
00039 K_EXPORT_COMPONENT_FACTORY( libkdevhaskellsupport, HaskellSupportFactory( &data ) )
00040
00041 HaskellSupportPart::HaskellSupportPart(QObject *parent, const char *name, const QStringList& )
00042 : KDevLanguageSupport("KDevPart", "kdevpart", parent, name ? name : "HaskellSupportPart" )
00043 {
00044 setInstance(HaskellSupportFactory::instance());
00045 setXMLFile("kdevpart_haskellsupport.rc");
00046
00047 connect( core(), SIGNAL( projectOpened() ),
00048 this, SLOT( projectOpened() ) );
00049 connect( core(), SIGNAL( projectClosed() ),
00050 this, SLOT( projectClosed() ) );
00051 connect( partController(), SIGNAL( savedFile( const KURL& ) ),
00052 this, SLOT( savedFile( const KURL& ) ) );
00053 connect( core(), SIGNAL( contextMenu( QPopupenu*, const Context* ) ),
00054 this, SLOT( contextMenu( QPopupenu *, const Context* ) ) );
00055 connect( core(), SIGNAL( configWidget( KDialogBase* ) ),
00056 this, SLOT( configWidget( KDialogBase* ) ) );
00057 connect( core(), SIGNAL( projectConfigWidget( KDialogBase* ) ),
00058 this, SLOT( projectConfigWidget( KDialogBase* ) ) );
00059 kdDebug( 9000 ) << "Haskell support found";
00060
00061
00062
00063 }
00064
00065
00066 HaskellSupportPart::~HaskellSupportPart()
00067 {
00068
00069 }
00070
00071
00072 HaskellSupportPart::Features HaskellSupportPart::features()
00073 {
00074 return Features( Functions );
00075 }
00076
00077 void HaskellSupportPart::projectOpened()
00078 {
00079 connect( project(), SIGNAL( addedFilesToProject( const QStringList& ) ),
00080 this, SLOT( addedFilesToProject( const QStringList& ) ) );
00081 connect( project(), SIGNAL( removedFilesFromProject( const QStringList& ) ),
00082 this, SLOT( removedFilesFromProject( const QStringList& ) ) );
00083 QDir::setCurrent( project()->projectDirectory() );
00084 m_projectFileList = project()->allFiles();
00085 m_projectClosed = false;
00086 QTimer::singleShot( 0, this, SLOT( slotInitialParse() ) );
00087 }
00088
00089 void HaskellSupportPart::projectClosed()
00090 {
00091 m_projectClosed = true;
00092 }
00093
00094 void HaskellSupportPart::configWidget( KDialogBase *dlg )
00095 {
00096 Q_UNUSED( dlg );
00097 return;
00098 }
00099
00100 void HaskellSupportPart::projectConfigWidget( KDialogBase *dlg )
00101 {
00102 Q_UNUSED( dlg );
00103 return;
00104 }
00105
00106 void HaskellSupportPart::contextMenu( QPopupMenu *popup, const Context *context )
00107 {
00108 Q_UNUSED( popup );
00109 return;
00110 }
00111
00112 void HaskellSupportPart::savedFile( const KURL &fileName )
00113 {
00114 Q_UNUSED( fileName.path() );
00115 return;
00116 }
00117
00118 void HaskellSupportPart::addedFilesToProject( const QStringList &fileList )
00119 {
00120 Q_UNUSED( fileList );
00121 return;
00122 }
00123
00124 void HaskellSupportPart::removedFilesFromProject( const QStringList &fileList )
00125 {
00126 Q_UNUSED( fileList );
00127 return;
00128 }
00129
00130 void HaskellSupportPart::slotProjectCompiled()
00131 {
00132 return;
00133 }
00134
00135 void HaskellSupportPart::slotInitialParse()
00136 {
00137 return;
00138 }
00139
00140 KMimeType::List HaskellSupportPart::mimeTypes()
00141 {
00142 KMimeType::List list;
00143 KMimeType::Ptr mime = KMimeType::mimeType( "text/x-haskell" );
00144 if( mime ) {
00145 list << mime;
00146 }
00147 return list;
00148 }
00149
00150 #include "haskellsupport_part.moc"
This file is part of the documentation for KDevelop Version 3.1.2.