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@57: Copyright (c) 2010 Chris Cannam Chris@57: Copyright (c) 2010 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: jtkorhonen@0: #ifndef HGEXPWIDGET_H jtkorhonen@0: #define HGEXPWIDGET_H jtkorhonen@0: Chris@43: #include "changeset.h" jtkorhonen@0: #include "common.h" jtkorhonen@0: Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: #include Chris@50: jtkorhonen@0: #define NUM_STAT_FILE_TYPES 7 jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: class HgExpWidget: public QTabWidget jtkorhonen@0: { jtkorhonen@0: Q_OBJECT jtkorhonen@0: jtkorhonen@0: public: jtkorhonen@0: HgExpWidget(QWidget *parent, QString remoteRepo, QString workFolderPath, jtkorhonen@0: unsigned char viewFileTypesBits = DEFAULT_HG_STAT_BITS); jtkorhonen@0: void updateWorkFolderFileList(QString fileList); jtkorhonen@0: void updateLocalRepoHeadsList(QString headList); jtkorhonen@0: void updateLocalRepoHgLogList(QString hgLogList); jtkorhonen@0: void updateLocalRepoParentsList(QString parentsList); jtkorhonen@0: void setWorkFolderAndRepoNames(QString workFolderPath, QString remoteRepoPath); jtkorhonen@0: QString getCurrentFileListLine(); jtkorhonen@0: void getHistoryDiffRevisions(QString& revA, QString& revB); jtkorhonen@0: void getUpdateToRevRevision(QString& rev); jtkorhonen@0: void clearLists(); jtkorhonen@32: void enableDisableOtherTabs(int tabPage); jtkorhonen@0: QString getStatFlags(void); jtkorhonen@0: unsigned char getFileTypesBits(); jtkorhonen@0: jtkorhonen@0: jtkorhonen@0: QListWidget *workFolderFileList; jtkorhonen@0: QListWidget *localRepoHeadsList; jtkorhonen@0: QListWidget *localRepoHgLogList; jtkorhonen@0: jtkorhonen@0: signals: jtkorhonen@0: void workFolderViewTypesChanged(); jtkorhonen@0: jtkorhonen@32: private slots: jtkorhonen@32: void copyComment(); jtkorhonen@32: jtkorhonen@0: private: jtkorhonen@0: QGroupBox *grpRemoteRepo; jtkorhonen@0: QWidget *workPageWidget; Chris@43: QWidget *historyGraphPageWidget; cannam@45: QWidget *historyGraphWidget; cannam@45: QWidget *historyGraphPanner; jtkorhonen@0: QWidget *historyPageWidget; jtkorhonen@0: QWidget *headsPageWidget; jtkorhonen@0: jtkorhonen@0: QGroupBox *grpLocalRepo; jtkorhonen@0: QVBoxLayout *mainLayout; jtkorhonen@0: QVBoxLayout *localRepoLayout; jtkorhonen@0: QVBoxLayout *parentsLayout; jtkorhonen@0: QListWidget *localRepoHgParentsList; jtkorhonen@0: QLabel *parentsLabel; jtkorhonen@32: QMenu *userListMenu; jtkorhonen@32: QAction *copyCommentAct; jtkorhonen@0: jtkorhonen@0: QGroupBox *grpWorkFolder; jtkorhonen@0: QHBoxLayout *workFolderLayout; jtkorhonen@0: QGroupBox *grpViewFileTypes; jtkorhonen@0: QVBoxLayout *fileTypesLayout; jtkorhonen@0: QCheckBox *chkViewFileTypes[NUM_STAT_FILE_TYPES]; jtkorhonen@0: jtkorhonen@0: QVBoxLayout *historyLayout; jtkorhonen@0: jtkorhonen@0: QVBoxLayout *headsLayout; jtkorhonen@0: jtkorhonen@0: QString findRev(QString itemText, QString& smallRev); jtkorhonen@0: QStringList splitChangeSets(QString chgSetsStr); Chris@43: Changesets parseChangeSets(QString changeSetsStr); Chris@43: jtkorhonen@0: int findLineStart(int nowIndex, QString chgSetsStr); jtkorhonen@32: void contextMenuEvent (QContextMenuEvent * event); jtkorhonen@0: }; jtkorhonen@0: jtkorhonen@0: #endif // HGEXPWIDGET_H