• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

vcs

vcsstatusinfo.cpp

00001 /***************************************************************************
00002  *   This file is part of KDevelop                                         *
00003  *   Copyright 2007 Andreas Pakulat <apaku@gmx.de>                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU Library General Public     *
00016  *   License along with this program; if not, write to the                 *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00019  ***************************************************************************/
00020 
00021 #include "vcsstatusinfo.h"
00022 
00023 #include <QtCore/QMap>
00024 #include <QtCore/QPair>
00025 #include <QtCore/QString>
00026 #include <QtCore/QStringList>
00027 
00028 namespace KDevelop
00029 {
00030 
00031 class VcsStatusInfoPrivate
00032 {
00033 public:
00034     int state;
00035     KUrl url;
00036 };
00037 
00038 VcsStatusInfo::VcsStatusInfo()
00039     : d( new VcsStatusInfoPrivate)
00040 {
00041     d->state = VcsStatusInfo::ItemUnknown;
00042 }
00043 
00044 VcsStatusInfo::~VcsStatusInfo()
00045 {
00046     delete d;
00047 }
00048 
00049 VcsStatusInfo::VcsStatusInfo( const VcsStatusInfo& rhs )
00050     : d(new VcsStatusInfoPrivate)
00051 {
00052     d->state = rhs.d->state;
00053     d->url = rhs.d->url;
00054 }
00055 
00056 VcsStatusInfo& VcsStatusInfo::operator=( const VcsStatusInfo& rhs)
00057 {
00058     if(this == &rhs)
00059         return *this;
00060     d->state = rhs.d->state;
00061     d->url = rhs.d->url;
00062     return *this;
00063 }
00064 
00065 bool VcsStatusInfo::operator==( const KDevelop::VcsStatusInfo& rhs) const
00066 {
00067     return ( d->state == rhs.d->state && d->url == rhs.d->url );
00068 }
00069 
00070 bool VcsStatusInfo::operator!=( const KDevelop::VcsStatusInfo& rhs) const
00071 {
00072     return !(operator==(rhs));
00073 }
00074 
00075 void VcsStatusInfo::setUrl( const KUrl& url )
00076 {
00077     d->url = url;
00078 }
00079 
00080 void VcsStatusInfo::setExtendedState( int newstate )
00081 {
00082     d->state = newstate;
00083 }
00084 
00085 void VcsStatusInfo::setState( VcsStatusInfo::State state )
00086 {
00087     d->state = state;
00088 }
00089 
00090 int VcsStatusInfo::extendedState() const
00091 {
00092     return d->state;
00093 }
00094 
00095 KUrl VcsStatusInfo::url() const
00096 {
00097     return d->url;
00098 }
00099 
00100 VcsStatusInfo::State VcsStatusInfo::state() const
00101 {
00102     return VcsStatusInfo::State(d->state);
00103 }
00104 
00105 
00106 }
00107 

vcs

Skip menu "vcs"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal