KDevelop API Documentation

CvsServicePart Class Reference

This is an experimental attempt to integrate Cervisia HEAD's cvsservice into kdevelop (read FAQ). More...

#include <cvspart.h>

Inheritance diagram for CvsServicePart:

KDevVersionControl KDevPlugin QObject KXMLGUIClient List of all members.

Public Member Functions

 CvsServicePart (QObject *parent, const char *name, const QStringList &)
 Standard constructor.

virtual ~CvsServicePart ()
 Destructor.

virtual QWidgetnewProjectWidget (QWidget *parent)
 Returns the configuration widget (for properly configuring the project to use CVS), child of parent.

virtual void createNewProject (const QString &dir)
 Setup a directory tree for use with CVS.

virtual bool fetchFromRepository ()
 Fetch a module from remote repository, so it can be used for importing.

virtual KDevVCSFileInfoProviderfileInfoProvider () const
virtual bool isValidDirectory (const QString &dirPath) const

Private Slots

void contextMenu (QPopupMenu *popup, const Context *context)
 Add menu items binded to cvs operations' slots to popup, using data in context.

void slotActionLogin ()
void slotActionLogout ()
void slotActionCommit ()
void slotActionUpdate ()
void slotActionAdd ()
void slotActionAddBinary ()
void slotActionRemove ()
void slotActionRemoveSticky ()
void slotActionLog ()
void slotActionDiff ()
void slotActionTag ()
void slotActionUnTag ()
void slotActionAddToIgnoreList ()
void slotActionRemoveFromIgnoreList ()
void slotCommit ()
void slotUpdate ()
void slotAdd ()
void slotAddBinary ()
void slotRemove ()
void slotRemoveSticky ()
void slotLog ()
void slotDiff ()
void slotTag ()
void slotUnTag ()
void slotAddToIgnoreList ()
void slotRemoveFromIgnoreList ()
void slotProjectOpened ()
void slotProjectClosed ()
void slotAddFilesToProject (const QStringList &)
void slotRemovedFilesFromProject (const QStringList &)
void projectConfigWidget (KDialogBase *dlg)
 Adds a configuration widget (for properly configuring CVS command-line options) and adds it to dlg.

void slotStopButtonClicked (KDevPlugin *)
 Called when the user wishes to stop an operation.


Private Member Functions

void init ()
void setupActions ()
bool urlFocusedDocument (KURL &url)
 Returns the KURL for the currently focused document, if there is any.


Private Attributes

KURL::List m_urls
 A list of KURLs of the files to be "operated" on (to be committed, added, removed, ...).

QGuardedPtr< CvsFormm_cvsConfigurationForm
 This is a pointer to the d->form used for collecting data about CVS project creation (used by the ApplicationWizard in example).

KActionactionCommit
KActionactionDiff
KActionactionLog
KActionactionAdd
KActionactionAddBinary
KActionactionRemove
KActionactionUpdate
KActionactionRemoveSticky
KActionactionAddToIgnoreList
KActionactionRemoveFromIgnoreList
KActionactionTag
KActionactionUnTag
KActionactionLogin
KActionactionLogout
CvsServicePartImplm_impl

Detailed Description

This is an experimental attempt to integrate Cervisia HEAD's cvsservice into kdevelop (read FAQ).

This part _does_ require cvsservice being installed on your system: the configure script in the main source directory should autodetect the presence of Cervisia and build it. If Cervisia wasn't installed in $KDEDIR than you need to specify paths for lib and include files, for example: --with-extra-libs=$HOME/kde/lib --with-extra-includes=$HOME/kde/include (where $HOME/kde is where I install my own kde stuff so I don't mess with working kde installation)

WARNING: So, if you have already compiled kdevelop *without* cvsservice and have now installed cervisia to try this nice piece of software, you need to re-run configure so it can detect cervisia installation and enable compilation for vcs/cvsservice.

WARNING: Keep in mind that there are incoming changes in cvsservice architecture which could make this part quite subject to heavy modifications.

WARNING2: If it doesn't compile try to update your cvsservice.

Implementation of this component is done by:

Todo:
  • Fix the "cvs update" function which behave strangely for sub-directories of the main project dir.
  • (> 3.0) Replace the menu entries text with shorter ones
  • (> 3.0) Add a new state & color enntry for 'Needs Patch' CVS state :-/
  • Fix bugs on bugs.kde.org ;-)

Test with SSH repositories!

Share a common outputview between VCS: CvsProcessWidget should be reworked :-/

Additional slots for more complex stuff as status, revert, patch creation, ...

Author(s):
Mario Scalas

Maintainer(s):
Mario Scalas

Feature(s):
All that provided by parts/cvs

it is possible to 'add as binary' files to repository

checkout from remote repository ability added to the appwizard/importdlg

should handle :ext: repositories thanks to cvsservice

can tag / un-tag files

can revert and diff between specific releases

can do multiple diff from a common cvs log output text

Bug:
bugs in cvs part component at Bugzilla database

Requirement(s):
CVS >= 1.10.6

Cervisia >= 2.1 (from kdesdk package included in KDE >= 3.2)

F.A.Q.:
Does cvsservicepart support login with :pserver: or :ext: ? Well, I dunno ;-) I have no ssh repositories to test so feel free to provide feedback on the subject :-)

Definition at line 38 of file cvspart.h.


Constructor & Destructor Documentation

CvsServicePart::CvsServicePart QObject parent,
const char *  name,
const QStringList
 

Standard constructor.

CvsServicePart::~CvsServicePart  )  [virtual]
 

Destructor.

Definition at line 105 of file cvspart.cpp.

References m_cvsConfigurationForm, and m_impl.


Member Function Documentation

void CvsServicePart::contextMenu QPopupMenu popup,
const Context context
[private, slot]
 

Add menu items binded to cvs operations' slots to popup, using data in context.

Not that context _must_ be FileContext-type, otherwise will do nothing.

Definition at line 275 of file cvspart.cpp.

References actionAdd, actionAddBinary, actionAddToIgnoreList, actionCommit, actionDiff, actionLog, actionRemove, actionRemoveFromIgnoreList, actionRemoveSticky, actionTag, actionUnTag, actionUpdate, contextMenu(), URLUtil::dump(), endl(), Context::hasType(), kdDebug(), m_urls, slotAdd(), slotAddBinary(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotTag(), slotUnTag(), slotUpdate(), KAction::text, EditorContext::url(), and FileContext::urls().

Referenced by contextMenu(), and init().

void CvsServicePart::createNewProject const QString dirName  )  [virtual]
 

Setup a directory tree for use with CVS.

Fixme:
actually there is no way to inform that a _new_ ("just created")

Reimplemented from KDevVersionControl.

Definition at line 234 of file cvspart.cpp.

References CvsServicePartImpl::createNewProject(), createNewProject(), endl(), g_projectWasJustCreated, kdDebug(), m_cvsConfigurationForm, and m_impl.

Referenced by createNewProject().

bool CvsServicePart::fetchFromRepository  )  [virtual]
 

Fetch a module from remote repository, so it can be used for importing.

Reimplemented from KDevVersionControl.

Definition at line 219 of file cvspart.cpp.

References CvsServicePartImpl::checkout(), and m_impl.

KDevVCSFileInfoProvider * CvsServicePart::fileInfoProvider  )  const [virtual]
 

Returns:
the info provider for VCS sandboxes

Reimplemented from KDevVersionControl.

Definition at line 227 of file cvspart.cpp.

References CvsServicePartImpl::fileInfoProvider(), and m_impl.

void CvsServicePart::init  )  [private]
 

Definition at line 113 of file cvspart.cpp.

References contextMenu(), KDevPlugin::core(), KDevMainWindow::embedOutputView(), m_impl, CvsServicePartImpl::m_widget, KDevPlugin::mainWindow(), CvsServicePartImpl::processWidget(), projectConfigWidget(), setupActions(), slotProjectClosed(), slotProjectOpened(), and slotStopButtonClicked().

bool CvsServicePart::isValidDirectory const QString dirPath  )  const [virtual]
 

Parameters:
dirPath absolute path of the directory
Returns:
true if the the directory is a valid CVS sandbox

Reimplemented from KDevVersionControl.

Definition at line 363 of file cvspart.cpp.

References CvsServicePartImpl::isValidDirectory(), isValidDirectory(), and m_impl.

Referenced by isValidDirectory(), slotProjectClosed(), and slotProjectOpened().

QWidget * CvsServicePart::newProjectWidget QWidget parent  )  [virtual]
 

Returns the configuration widget (for properly configuring the project to use CVS), child of parent.

Reimplemented from KDevVersionControl.

Definition at line 267 of file cvspart.cpp.

References m_cvsConfigurationForm, and newProjectWidget().

Referenced by newProjectWidget().

void CvsServicePart::projectConfigWidget KDialogBase dlg  )  [private, slot]
 

Adds a configuration widget (for properly configuring CVS command-line options) and adds it to dlg.

Definition at line 258 of file cvspart.cpp.

References KDialogBase::addVBoxPage(), and projectConfigWidget().

Referenced by init(), and projectConfigWidget().

void CvsServicePart::setupActions  )  [private]
 

Definition at line 141 of file cvspart.cpp.

References actionAdd, actionAddBinary, actionAddToIgnoreList, KXMLGUIClient::actionCollection(), actionCommit, actionDiff, actionLog, actionLogin, actionLogout, actionRemove, actionRemoveFromIgnoreList, actionRemoveSticky, actionTag, actionUnTag, actionUpdate, KAction::setToolTip(), KAction::setWhatsThis(), slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionLogin(), slotActionLogout(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), and slotActionUpdate().

Referenced by init().

void CvsServicePart::slotActionAdd  )  [private, slot]
 

Definition at line 406 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionAddBinary  )  [private, slot]
 

Definition at line 417 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionAddToIgnoreList  )  [private, slot]
 

Definition at line 494 of file cvspart.cpp.

References CvsServicePartImpl::addToIgnoreList(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionCommit  )  [private, slot]
 

Definition at line 384 of file cvspart.cpp.

References CvsServicePartImpl::commit(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionDiff  )  [private, slot]
 

Definition at line 461 of file cvspart.cpp.

References CvsServicePartImpl::diff(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionLog  )  [private, slot]
 

Definition at line 450 of file cvspart.cpp.

References CvsServicePartImpl::log(), m_impl, and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionLogin  )  [private, slot]
 

Definition at line 370 of file cvspart.cpp.

References CvsServicePartImpl::login(), and m_impl.

Referenced by setupActions().

void CvsServicePart::slotActionLogout  )  [private, slot]
 

Definition at line 377 of file cvspart.cpp.

References CvsServicePartImpl::logout(), and m_impl.

Referenced by setupActions().

void CvsServicePart::slotActionRemove  )  [private, slot]
 

Definition at line 428 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::remove(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionRemoveFromIgnoreList  )  [private, slot]
 

Definition at line 505 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::removeFromIgnoreList(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionRemoveSticky  )  [private, slot]
 

Definition at line 439 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::removeStickyFlag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionTag  )  [private, slot]
 

Definition at line 472 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::tag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionUnTag  )  [private, slot]
 

Definition at line 483 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::unTag(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotActionUpdate  )  [private, slot]
 

Definition at line 395 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::update(), and urlFocusedDocument().

Referenced by setupActions().

void CvsServicePart::slotAdd  )  [private, slot]
 

Definition at line 530 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotAddBinary  )  [private, slot]
 

Definition at line 537 of file cvspart.cpp.

References CvsServicePartImpl::add(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotAddFilesToProject const QStringList  )  [private, slot]
 

Definition at line 610 of file cvspart.cpp.

References CvsServicePartImpl::addFilesToProject(), m_impl, and slotAddFilesToProject().

Referenced by slotAddFilesToProject(), slotProjectClosed(), and slotProjectOpened().

void CvsServicePart::slotAddToIgnoreList  )  [private, slot]
 

Definition at line 586 of file cvspart.cpp.

References CvsServicePartImpl::addToIgnoreList(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotCommit  )  [private, slot]
 

Definition at line 516 of file cvspart.cpp.

References CvsServicePartImpl::commit(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotDiff  )  [private, slot]
 

Definition at line 565 of file cvspart.cpp.

References CvsServicePartImpl::diff(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotLog  )  [private, slot]
 

Definition at line 558 of file cvspart.cpp.

References CvsServicePartImpl::log(), m_impl, and m_urls.

Referenced by contextMenu().

void CvsServicePart::slotProjectClosed  )  [private, slot]
 

Definition at line 652 of file cvspart.cpp.

References endl(), CvsOptions::instance(), isValidDirectory(), kdDebug(), KDevPlugin::project(), CvsOptions::save(), slotAddFilesToProject(), and slotRemovedFilesFromProject().

Referenced by init().

void CvsServicePart::slotProjectOpened  )  [private, slot]
 

Definition at line 624 of file cvspart.cpp.

References endl(), g_projectWasJustCreated, CvsOptions::instance(), isValidDirectory(), kdDebug(), CvsOptions::load(), KDevPlugin::project(), CvsOptions::save(), slotAddFilesToProject(), and slotRemovedFilesFromProject().

Referenced by init().

void CvsServicePart::slotRemove  )  [private, slot]
 

Definition at line 544 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::remove().

Referenced by contextMenu().

void CvsServicePart::slotRemovedFilesFromProject const QStringList  )  [private, slot]
 

Definition at line 617 of file cvspart.cpp.

References m_impl, CvsServicePartImpl::removedFilesFromProject(), and slotRemovedFilesFromProject().

Referenced by slotProjectClosed(), slotProjectOpened(), and slotRemovedFilesFromProject().

void CvsServicePart::slotRemoveFromIgnoreList  )  [private, slot]
 

Definition at line 593 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::removeFromIgnoreList().

Referenced by contextMenu().

void CvsServicePart::slotRemoveSticky  )  [private, slot]
 

Definition at line 551 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::removeStickyFlag().

Referenced by contextMenu().

void CvsServicePart::slotStopButtonClicked KDevPlugin  )  [private, slot]
 

Called when the user wishes to stop an operation.

Definition at line 600 of file cvspart.cpp.

References CvsServicePartImpl::flushJobs(), m_impl, and slotStopButtonClicked().

Referenced by init(), and slotStopButtonClicked().

void CvsServicePart::slotTag  )  [private, slot]
 

Definition at line 572 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::tag().

Referenced by contextMenu().

void CvsServicePart::slotUnTag  )  [private, slot]
 

Definition at line 579 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::unTag().

Referenced by contextMenu().

void CvsServicePart::slotUpdate  )  [private, slot]
 

Definition at line 523 of file cvspart.cpp.

References m_impl, m_urls, and CvsServicePartImpl::update().

Referenced by contextMenu().

bool CvsServicePart::urlFocusedDocument KURL url  )  [private]
 

Returns the KURL for the currently focused document, if there is any.

Definition at line 342 of file cvspart.cpp.

References KParts::PartManager::activePart(), endl(), KURL::isLocalFile(), kdDebug(), KDevPlugin::partController(), KParts::ReadOnlyPart::url(), and urlFocusedDocument().

Referenced by slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), slotActionUpdate(), and urlFocusedDocument().


Member Data Documentation

KAction * CvsServicePart::actionAdd [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionAddBinary [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionAddToIgnoreList [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction* CvsServicePart::actionCommit [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionDiff [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionLog [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionLogin [private]
 

Definition at line 141 of file cvspart.h.

Referenced by setupActions().

KAction * CvsServicePart::actionLogout [private]
 

Definition at line 141 of file cvspart.h.

Referenced by setupActions().

KAction * CvsServicePart::actionRemove [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionRemoveFromIgnoreList [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionRemoveSticky [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionTag [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionUnTag [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

KAction * CvsServicePart::actionUpdate [private]
 

Definition at line 141 of file cvspart.h.

Referenced by contextMenu(), and setupActions().

QGuardedPtr<CvsForm> CvsServicePart::m_cvsConfigurationForm [private]
 

This is a pointer to the d->form used for collecting data about CVS project creation (used by the ApplicationWizard in example).

Definition at line 138 of file cvspart.h.

Referenced by createNewProject(), newProjectWidget(), and ~CvsServicePart().

CvsServicePartImpl* CvsServicePart::m_impl [private]
 

Definition at line 156 of file cvspart.h.

Referenced by createNewProject(), fetchFromRepository(), fileInfoProvider(), init(), isValidDirectory(), slotActionAdd(), slotActionAddBinary(), slotActionAddToIgnoreList(), slotActionCommit(), slotActionDiff(), slotActionLog(), slotActionLogin(), slotActionLogout(), slotActionRemove(), slotActionRemoveFromIgnoreList(), slotActionRemoveSticky(), slotActionTag(), slotActionUnTag(), slotActionUpdate(), slotAdd(), slotAddBinary(), slotAddFilesToProject(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemovedFilesFromProject(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotStopButtonClicked(), slotTag(), slotUnTag(), slotUpdate(), and ~CvsServicePart().

KURL::List CvsServicePart::m_urls [private]
 

A list of KURLs of the files to be "operated" on (to be committed, added, removed, ...).

Definition at line 133 of file cvspart.h.

Referenced by contextMenu(), slotAdd(), slotAddBinary(), slotAddToIgnoreList(), slotCommit(), slotDiff(), slotLog(), slotRemove(), slotRemoveFromIgnoreList(), slotRemoveSticky(), slotTag(), slotUnTag(), and slotUpdate().


The documentation for this class was generated from the following files:
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:22 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003