File indexing completed on 2024-05-05 17:50:48
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht ral@alwins-world.de * 0003 * http://kdesvn.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 #ifndef KSVN_JOBVIEW_H 0021 #define KSVN_JOBVIEW_H 0022 0023 #include "ksvnwidgets/jobviewinterface.h" 0024 0025 class KsvnJobView: public org::kde::JobViewV2 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 KsvnJobView(qulonglong id, const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); 0031 0032 enum jobstate { 0033 STOPPED = 0, 0034 RUNNING, 0035 CANCELD 0036 }; 0037 0038 jobstate state()const 0039 { 0040 return m_state; 0041 } 0042 void setState(jobstate aState) 0043 { 0044 m_state = aState; 0045 } 0046 qulonglong id()const 0047 { 0048 return m_id; 0049 } 0050 0051 unsigned long percent(qulonglong amount) const; 0052 0053 virtual void setTotal(qlonglong max); 0054 qlonglong max()const 0055 { 0056 return m_max; 0057 } 0058 0059 protected Q_SLOTS: 0060 virtual void killJob(); 0061 private: 0062 qulonglong m_id; 0063 jobstate m_state; 0064 qlonglong m_max; 0065 }; 0066 0067 #endif