File indexing completed on 2024-04-28 05:42:00
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 #ifndef COMMANDEXEC_H 0021 #define COMMANDEXEC_H 0022 0023 #include <qobject.h> 0024 #include <qstring.h> 0025 0026 class KCmdLineArgs; 0027 class pCPart; 0028 0029 namespace svn 0030 { 0031 class Revision; 0032 } 0033 class QCommandLineParser; 0034 0035 /** 0036 @author Rajko Albrecht 0037 */ 0038 class CommandExec : public QObject 0039 { 0040 Q_OBJECT 0041 public: 0042 explicit CommandExec(QObject *parent); 0043 ~CommandExec() override; 0044 virtual int exec(const QCommandLineParser *parser); 0045 0046 protected slots: 0047 virtual void clientException(const QString &); 0048 virtual void slotNotifyMessage(const QString &); 0049 virtual void slotCmd_log(); 0050 virtual void slotCmd_update(); 0051 virtual void slotCmd_diff(); 0052 virtual void slotCmd_blame(); 0053 virtual void slotCmd_info(); 0054 virtual void slotCmd_commit(); 0055 virtual void slotCmd_cat(); 0056 virtual void slotCmd_get(); 0057 virtual void slotCmd_list(); 0058 virtual void slotCmd_copy(); 0059 virtual void slotCmd_move(); 0060 virtual void slotCmd_checkout(); 0061 virtual void slotCmd_checkoutto(); 0062 virtual void slotCmd_export(); 0063 virtual void slotCmd_exportto(); 0064 virtual void slotCmd_delete(); 0065 virtual void slotCmd_add(); 0066 virtual void slotCmd_revert(); 0067 virtual void slotCmd_addnew(); 0068 virtual void slotCmd_tree(); 0069 virtual void slotCmd_lock(); 0070 virtual void slotCmd_unlock(); 0071 0072 signals: 0073 void executeMe(); 0074 0075 protected: 0076 virtual bool scanRevision(); 0077 virtual bool askRevision(); 0078 0079 QString m_lastMessages; 0080 unsigned int m_lastMessagesLines; 0081 0082 private: 0083 pCPart *m_pCPart; 0084 0085 protected slots: 0086 void slotCmd_switch(); 0087 }; 0088 0089 #endif