Chris@57: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@57: Chris@57: /* Chris@57: EasyMercurial Chris@57: Chris@57: Based on HgExplorer by Jari Korhonen Chris@57: Copyright (c) 2010 Jari Korhonen Chris@244: Copyright (c) 2011 Chris Cannam Chris@244: Copyright (c) 2011 Queen Mary, University of London Chris@57: Chris@57: This program is free software; you can redistribute it and/or Chris@57: modify it under the terms of the GNU General Public License as Chris@57: published by the Free Software Foundation; either version 2 of the Chris@57: License, or (at your option) any later version. See the file Chris@57: COPYING included with this distribution for more information. Chris@57: */ Chris@57: Chris@96: #ifndef HGTABWIDGET_H Chris@96: #define HGTABWIDGET_H jtkorhonen@0: Chris@43: #include "changeset.h" jtkorhonen@0: #include "common.h" Chris@92: #include "filestates.h" jtkorhonen@0: Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@88: #include Chris@86: Chris@88: class FileStatusWidget; Chris@116: class HistoryWidget; jtkorhonen@0: Chris@96: class HgTabWidget: public QTabWidget jtkorhonen@0: { jtkorhonen@0: Q_OBJECT jtkorhonen@0: jtkorhonen@0: public: Chris@287: HgTabWidget(QWidget *parent, QString workFolderPath); Chris@91: jtkorhonen@0: void updateWorkFolderFileList(QString fileList); Chris@120: Chris@120: void setNewLog(QString hgLogList); Chris@120: void addIncrementalLog(QString hgLogList); Chris@120: Chris@287: void setLocalPath(QString workFolderPath); jtkorhonen@0: Chris@153: void setCurrent(QStringList ids, QString branch); Chris@128: Chris@230: void updateFileStates(); Chris@154: void updateHistory(); Chris@154: Chris@116: FileStates getFileStates() { return m_fileStates; } Chris@90: Chris@163: bool canDiff() const; Chris@90: bool canCommit() const; Chris@109: bool canRevert() const; Chris@92: bool canAdd() const; Chris@92: bool canRemove() const; Chris@163: bool canResolve() const; Chris@172: bool haveChangesToCommit() const; Chris@95: Chris@95: QStringList getAllSelectedFiles() const; Chris@103: Chris@95: QStringList getSelectedCommittableFiles() const; Chris@103: QStringList getAllCommittableFiles() const; Chris@103: Chris@109: QStringList getSelectedRevertableFiles() const; Chris@109: QStringList getAllRevertableFiles() const; Chris@109: Chris@95: QStringList getSelectedAddableFiles() const; Chris@103: QStringList getAllAddableFiles() const; Chris@103: Chris@95: QStringList getSelectedRemovableFiles() const; Chris@103: QStringList getAllRemovableFiles() const; Chris@95: Chris@163: QStringList getSelectedUnresolvedFiles() const; Chris@163: QStringList getAllUnresolvedFiles() const; Chris@163: Chris@95: signals: Chris@95: void selectionChanged(); Chris@199: void showAllChanged(bool); jtkorhonen@0: Chris@141: void commit(); Chris@141: void revert(); Chris@141: void diffWorkingFolder(); Chris@168: void showSummary(); Chris@141: Chris@141: void updateTo(QString id); Chris@148: void diffToParent(QString id, QString parent); Chris@289: void showSummary(Changeset *); Chris@141: void diffToCurrent(QString id); Chris@141: void mergeFrom(QString id); Chris@278: void newBranch(QString id); Chris@141: void tag(QString id); Chris@141: Chris@94: public slots: Chris@94: void clearSelections(); Chris@153: void showWorkTab(); Chris@153: void showHistoryTab(); Chris@94: jtkorhonen@0: private: Chris@116: FileStatusWidget *m_fileStatusWidget; Chris@116: HistoryWidget *m_historyWidget; Chris@116: FileStates m_fileStates; jtkorhonen@0: Chris@91: Changesets parseChangeSets(QString changeSetsStr); jtkorhonen@0: }; jtkorhonen@0: Chris@96: #endif // HGTABWIDGET_H