Warning, file /sdk/cervisia/cervisiapart.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 * Copyright (C) 1999-2002 Bernd Gehrmann 0003 * bernd@mail.berlios.de 0004 * Copyright (c) 2002-2005 Christian Loose <christian.loose@kdemail.net> 0005 * 0006 * This program is free software; you can redistribute it and/or modify 0007 * it under the terms of the GNU General Public License as published by 0008 * the Free Software Foundation; either version 2 of the License, or 0009 * (at your option) any later version. 0010 * 0011 * This program is distributed in the hope that it will be useful, 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0014 * GNU General Public License for more details. 0015 * 0016 * You should have received a copy of the GNU General Public License 0017 * along with this program; if not, write to the Free Software 0018 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0019 */ 0020 0021 #ifndef CERVISIAPART_H 0022 #define CERVISIAPART_H 0023 0024 #include <kparts/browserextension.h> 0025 #include <kparts/part.h> 0026 #include <kparts/statusbarextension.h> 0027 0028 #include "addremovedialog.h" 0029 #include "checkoutdialog.h" 0030 #include "commitdialog.h" 0031 #include "tagdialog.h" 0032 #include "watchdialog.h" 0033 0034 namespace Cervisia 0035 { 0036 class AddIgnoreMenu; 0037 class EditWithMenu; 0038 } 0039 class QLabel; 0040 class QSplitter; 0041 class UpdateView; 0042 class ProtocolView; 0043 class KAboutData; 0044 class KRecentFilesAction; 0045 class OrgKdeCervisia5CvsserviceCvsserviceInterface; 0046 class CervisiaBrowserExtension; 0047 0048 /** 0049 * An embeddable Cervisia viewer. 0050 */ 0051 class CervisiaPart : public KParts::ReadOnlyPart 0052 { 0053 Q_OBJECT 0054 0055 public: 0056 CervisiaPart(QWidget *parentWidget, QObject *parent, const QVariantList &args = QVariantList()); 0057 ~CervisiaPart() override; 0058 0059 /** 0060 * Get the config object for the part's instance. 0061 */ 0062 static KConfig *config(); 0063 0064 QString sandBox() const 0065 { 0066 return sandbox; 0067 } 0068 0069 static KAboutData *createAboutData(); 0070 0071 public slots: 0072 // unused because we overwrite the default behaviour of openUrl() 0073 bool openFile() override 0074 { 0075 return true; 0076 } 0077 bool openUrl(const QUrl &) override; 0078 0079 void openFile(QString filename); 0080 void openFiles(const QStringList &filenames); 0081 void popupRequested(const QPoint &); 0082 void updateActions(); 0083 0084 void slotOpen(); 0085 void slotResolve(); 0086 void slotStatus(); 0087 void slotUpdate(); 0088 void slotChangeLog(); 0089 void slotCommit(); 0090 void slotAdd(); 0091 void slotAddBinary(); 0092 0093 void slotRemove(); 0094 void slotFileProperties(); 0095 void slotRevert(); 0096 void slotBrowseLog(); 0097 // void slotBrowseMultiLog(); 0098 void slotAnnotate(); 0099 void slotDiffBase(); 0100 void slotDiffHead(); 0101 void slotLastChange(); 0102 void slotHistory(); 0103 void slotCreateRepository(); 0104 void slotCheckout(); 0105 void slotImport(); 0106 void slotRepositories(); 0107 void slotCreateTag(); 0108 void slotDeleteTag(); 0109 void slotUpdateToTag(); 0110 void slotUpdateToHead(); 0111 void slotMerge(); 0112 void slotAddWatch(); 0113 void slotRemoveWatch(); 0114 void slotShowWatchers(); 0115 void slotEdit(); 0116 void slotUnedit(); 0117 void slotShowEditors(); 0118 void slotLock(); 0119 void slotUnlock(); 0120 void slotMakePatch(); 0121 void slotCreateDirs(); 0122 void slotPruneDirs(); 0123 void slotHideFiles(); 0124 void slotHideUpToDate(); 0125 void slotHideRemoved(); 0126 0127 void slotHideNotInCVS(); 0128 void slotHideEmptyDirectories(); 0129 0130 void slotFoldTree(); 0131 void slotUnfoldTree(); 0132 void slotUnfoldFolder(); 0133 0134 void slotUpdateRecursive(); 0135 void slotCommitRecursive(); 0136 void slotDoCVSEdit(); 0137 void slotConfigure(); 0138 void slotCVSInfo(); 0139 0140 protected slots: 0141 void slotJobFinished(); 0142 0143 private slots: 0144 // called by menu action "Open Sandbox..." 0145 void slotOpenSandbox(); 0146 void slotSetupStatusBar(); 0147 0148 protected: 0149 void guiActivateEvent(KParts::GUIActivateEvent *event) override; 0150 0151 private: 0152 enum JobType { Unknown, Commit }; 0153 0154 void setupActions(); 0155 0156 void readSettings(); 0157 void writeSettings(); 0158 0159 bool openSandbox(const QUrl &url); 0160 void updateSandbox(const QString &extraopt = QString()); 0161 void addOrRemove(AddRemoveDialog::ActionType action); 0162 void addOrRemoveWatch(WatchDialog::ActionType action); 0163 void createOrDeleteTag(Cervisia::TagDialog::ActionType action); 0164 void showJobStart(const QString &command); 0165 void showDiff(const QString &revision); 0166 void setFilter(); 0167 0168 UpdateView *update; 0169 ProtocolView *protocol; 0170 bool hasRunningJob; 0171 QSplitter *splitter; 0172 0173 QString sandbox; 0174 QString repository; 0175 0176 QString changelogstr; 0177 QStringList recentCommits; 0178 bool opt_hideFiles, opt_hideUpToDate, opt_hideRemoved, opt_hideNotInCVS, opt_hideEmptyDirectories; 0179 bool opt_createDirs, opt_pruneDirs; 0180 bool opt_updateRecursive, opt_commitRecursive, opt_doCVSEdit; 0181 0182 // for the Open Recent directories 0183 KRecentFilesAction *recent; 0184 0185 OrgKdeCervisia5CvsserviceCvsserviceInterface *cvsService; 0186 KParts::StatusBarExtension *m_statusBar; 0187 CervisiaBrowserExtension *m_browserExt; 0188 QLabel *filterLabel; 0189 0190 QAction *m_editWithAction; 0191 Cervisia::EditWithMenu *m_currentEditMenu; 0192 QAction *m_addIgnoreAction; 0193 Cervisia::AddIgnoreMenu *m_currentIgnoreMenu; 0194 JobType m_jobType; 0195 QString m_cvsServiceInterfaceName; 0196 }; 0197 0198 /** 0199 * A mysterious class, needed to make Konqueror intrgration work. 0200 */ 0201 class CervisiaBrowserExtension : public KParts::BrowserExtension 0202 { 0203 Q_OBJECT 0204 0205 public: 0206 explicit CervisiaBrowserExtension(CervisiaPart *); 0207 ~CervisiaBrowserExtension() override; 0208 }; 0209 0210 #endif // CERVISIAPART_H 0211 0212 // Local Variables: 0213 // c-basic-offset: 4 0214 // End: