kdevversioncontrol.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 Copyright (C) 2001 Matthias Hoelzer-Kluepfel <hoelzer@kde.org> 00003 Copyright (C) 2002-2003 Roberto Raggi <roberto@kdevelop.org> 00004 Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> 00005 Copyright (C) 2003 Mario Scalas <mario.scalas@libero.it> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #include <kmessagebox.h> 00024 #include <klocale.h> 00025 #include <kdebug.h> 00026 00027 #include <kdevmainwindow.h> 00028 #include <kmainwindow.h> 00029 #include <kdevapi.h> 00030 00031 #include "kdevversioncontrol.h" 00032 00033 KDevVersionControl::KDevVersionControl( const QString& pluginName, 00034 const QString& icon, QObject *parent, const char *name ) 00035 : KDevPlugin( pluginName, icon, parent, name ) 00036 { 00037 m_api = static_cast<KDevApi *>( parent ); 00038 00039 kdDebug( 9000 ) << "Registering Version Control System: " << uid() << endl; 00040 00041 registerVersionControl( this ); 00042 } 00043 00045 00046 KDevVersionControl::~KDevVersionControl() 00047 { 00048 unregisterVersionControl( this ); 00049 } 00050 00052 00053 QString KDevVersionControl::uid() const 00054 { 00055 return this->name(); 00056 // return this->pluginName(); 00057 } 00058 00060 00061 QWidget* KDevVersionControl::newProjectWidget( QWidget */*parent*/ ) 00062 { 00063 KMessageBox::sorry( mainWindow()->main(), i18n( "Not implemented." ) ); 00064 00065 return 0; 00066 } 00067 00069 00070 void KDevVersionControl::createNewProject( const QString&/* dir*/ ) 00071 { 00072 KMessageBox::sorry( mainWindow()->main(), i18n( "Not implemented." ) ); 00073 00074 return; 00075 } 00076 00078 00079 bool KDevVersionControl::fetchFromRepository() 00080 { 00081 KMessageBox::sorry( mainWindow()->main(), i18n( "Not implemented." ) ); 00082 00083 return false; 00084 } 00085 00087 00088 bool KDevVersionControl::isValidDirectory( const QString &/*dirPath*/ ) const 00089 { 00090 return false; 00091 } 00092 00094 00095 KDevVCSFileInfoProvider *KDevVersionControl::fileInfoProvider() const 00096 { 00097 return 0; 00098 } 00099 00101 00102 void KDevVersionControl::setVersionControl( KDevVersionControl *vcsToUse ) 00103 { 00104 return m_api->setVersionControl( vcsToUse ); 00105 } 00106 00108 00109 void KDevVersionControl::registerVersionControl( KDevVersionControl *vcs ) 00110 { 00111 m_api->registerVersionControl( vcs ); 00112 } 00113 00115 00116 void KDevVersionControl::unregisterVersionControl( KDevVersionControl *vcs ) 00117 { 00118 m_api->unregisterVersionControl( vcs ); 00119 } 00120 00122 00123 QStringList KDevVersionControl::registeredVersionControls() const 00124 { 00125 return m_api->registeredVersionControls(); 00126 } 00127 00129 00130 KDevVersionControl *KDevVersionControl::versionControlByName( const QString &uid ) const 00131 { 00132 return m_api->versionControlByName( uid ); 00133 } 00134 00135 00136 00137 #include "kdevversioncontrol.moc"