File indexing completed on 2024-04-14 05:35:35
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 0021 #ifndef KDESVNVIEW_H 0022 #define KDESVNVIEW_H 0023 0024 #include "svnqt/repositorylistener.h" 0025 #include <QUrl> 0026 #include <QWidget> 0027 #include <kparts/part.h> 0028 0029 class QPainter; 0030 class KdeSvnDirList; 0031 class QVBoxLayout; 0032 class QSpacerItem; 0033 class QSplitter; 0034 class KActionCollection; 0035 class QTextBrowser; 0036 class QProgressBar; 0037 class MainTreeWidget; 0038 0039 /** 0040 * This is the main view class for kdesvn. Most of the non-menu, 0041 * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go 0042 * here. 0043 * 0044 * @short Main view 0045 * @author Rajko Albrecht <ral@alwins-world.de> 0046 * @version 0.1 0047 */ 0048 class kdesvnView : public QWidget, public svn::repository::RepositoryListener 0049 { 0050 Q_OBJECT 0051 public: 0052 /** 0053 * Default constructor 0054 */ 0055 kdesvnView(KActionCollection *, QWidget *parent, bool full = false); 0056 0057 /** 0058 * Destructor 0059 */ 0060 ~kdesvnView() override; 0061 0062 /** 0063 * Random 'get' function 0064 */ 0065 QUrl currentUrl() const; 0066 0067 /** 0068 * Random 'set' function 0069 */ 0070 virtual bool openUrl(const QUrl &url); 0071 0072 /* repositorylistener methods */ 0073 void sendWarning(const QString &) override; 0074 void sendError(const QString &) override; 0075 bool isCanceld() override; 0076 virtual void stopCacheThreads(); 0077 0078 Q_SIGNALS: 0079 /** 0080 * Use this signal to change the content of the statusbar 0081 */ 0082 void signalChangeStatusbar(const QString &); 0083 /** 0084 * Extra messages for a temporary status bar 0085 */ 0086 void sigExtraStatusMessage(const QString &); 0087 0088 /** 0089 * Use this signal to change the content of the caption 0090 */ 0091 void signalChangeCaption(const QString &); 0092 0093 void sigShowPopup(const QString &, QWidget **); 0094 void sigSwitchUrl(const QUrl &); 0095 void sigUrlChanged(const QUrl &url); 0096 void sigUrlOpened(bool); 0097 void setWindowCaption(const QString &); 0098 void sigMakeBaseDirs(); 0099 0100 /* repositorylistener methods */ 0101 void tickProgress(); 0102 void waitShow(bool); 0103 0104 public Q_SLOTS: 0105 virtual void closeMe(); 0106 virtual void slotDispPopup(const QString &, QWidget **); 0107 virtual void refreshCurrentTree(); 0108 virtual void slotSettingsChanged(); 0109 virtual void slotCreateRepo(); 0110 virtual void slotDumpRepo(); 0111 virtual void slotHotcopy(); 0112 virtual void slotLoaddump(); 0113 0114 /* repositorylistener methods */ 0115 virtual void setCanceled(bool); 0116 virtual void fillCacheStatus(qlonglong, qlonglong); 0117 0118 virtual void slotSavestate(); 0119 0120 protected Q_SLOTS: 0121 virtual void slotOnURL(const QString &url); 0122 virtual void slotSetTitle(const QString &title); 0123 virtual void slotAppendLog(const QString &text); 0124 void slotUrlChanged(const QUrl &url); 0125 void onCustomLogWindowContextMenuRequested(const QPoint &pos); 0126 0127 protected: 0128 // kdesvnfilelist*m_flist; 0129 MainTreeWidget *m_TreeWidget; 0130 KActionCollection *m_Collection; 0131 0132 QSplitter *m_Splitter, *m_infoSplitter; 0133 QUrl m_currentUrl; 0134 QTextBrowser *m_LogWindow; 0135 QVBoxLayout *m_topLayout; 0136 QProgressBar *m_CacheProgressBar; 0137 0138 protected: 0139 virtual void setupActions(); 0140 bool m_ReposCancel; 0141 }; 0142 0143 #endif // _KDESVNVIEW_H_