annotate hgexpwidget.h @ 79:aaeabc920ca8

* Some work toward doing the Right Thing with each possible combination of existing/nonexisting directories in Open dialog
author Chris Cannam
date Mon, 22 Nov 2010 12:30:40 +0000
parents f583e44d9d31
children 89f793fbedda
rev   line source
Chris@57 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@57 2
Chris@57 3 /*
Chris@57 4 EasyMercurial
Chris@57 5
Chris@57 6 Based on HgExplorer by Jari Korhonen
Chris@57 7 Copyright (c) 2010 Jari Korhonen
Chris@57 8 Copyright (c) 2010 Chris Cannam
Chris@57 9 Copyright (c) 2010 Queen Mary, University of London
Chris@57 10
Chris@57 11 This program is free software; you can redistribute it and/or
Chris@57 12 modify it under the terms of the GNU General Public License as
Chris@57 13 published by the Free Software Foundation; either version 2 of the
Chris@57 14 License, or (at your option) any later version. See the file
Chris@57 15 COPYING included with this distribution for more information.
Chris@57 16 */
Chris@57 17
jtkorhonen@0 18 #ifndef HGEXPWIDGET_H
jtkorhonen@0 19 #define HGEXPWIDGET_H
jtkorhonen@0 20
Chris@43 21 #include "changeset.h"
jtkorhonen@0 22 #include "common.h"
jtkorhonen@0 23
Chris@50 24 #include <QMenu>
Chris@50 25 #include <QListWidget>
Chris@50 26 #include <QGroupBox>
Chris@50 27 #include <QVBoxLayout>
Chris@50 28 #include <QCheckBox>
Chris@50 29 #include <QLabel>
Chris@50 30
jtkorhonen@0 31 #define NUM_STAT_FILE_TYPES 7
jtkorhonen@0 32
jtkorhonen@0 33
jtkorhonen@0 34 class HgExpWidget: public QTabWidget
jtkorhonen@0 35 {
jtkorhonen@0 36 Q_OBJECT
jtkorhonen@0 37
jtkorhonen@0 38 public:
jtkorhonen@0 39 HgExpWidget(QWidget *parent, QString remoteRepo, QString workFolderPath,
jtkorhonen@0 40 unsigned char viewFileTypesBits = DEFAULT_HG_STAT_BITS);
jtkorhonen@0 41 void updateWorkFolderFileList(QString fileList);
jtkorhonen@0 42 void updateLocalRepoHeadsList(QString headList);
jtkorhonen@0 43 void updateLocalRepoHgLogList(QString hgLogList);
jtkorhonen@0 44 void updateLocalRepoParentsList(QString parentsList);
jtkorhonen@0 45 void setWorkFolderAndRepoNames(QString workFolderPath, QString remoteRepoPath);
jtkorhonen@0 46 QString getCurrentFileListLine();
jtkorhonen@0 47 void getHistoryDiffRevisions(QString& revA, QString& revB);
jtkorhonen@0 48 void getUpdateToRevRevision(QString& rev);
jtkorhonen@0 49 void clearLists();
jtkorhonen@32 50 void enableDisableOtherTabs(int tabPage);
jtkorhonen@0 51 QString getStatFlags(void);
jtkorhonen@0 52 unsigned char getFileTypesBits();
jtkorhonen@0 53
jtkorhonen@0 54
jtkorhonen@0 55 QListWidget *workFolderFileList;
jtkorhonen@0 56 QListWidget *localRepoHeadsList;
jtkorhonen@0 57 QListWidget *localRepoHgLogList;
jtkorhonen@0 58
jtkorhonen@0 59 signals:
jtkorhonen@0 60 void workFolderViewTypesChanged();
jtkorhonen@0 61
jtkorhonen@32 62 private slots:
jtkorhonen@32 63 void copyComment();
jtkorhonen@32 64
jtkorhonen@0 65 private:
jtkorhonen@0 66 QGroupBox *grpRemoteRepo;
jtkorhonen@0 67 QWidget *workPageWidget;
Chris@43 68 QWidget *historyGraphPageWidget;
cannam@45 69 QWidget *historyGraphWidget;
cannam@45 70 QWidget *historyGraphPanner;
jtkorhonen@0 71 QWidget *historyPageWidget;
jtkorhonen@0 72 QWidget *headsPageWidget;
jtkorhonen@0 73
jtkorhonen@0 74 QGroupBox *grpLocalRepo;
jtkorhonen@0 75 QVBoxLayout *mainLayout;
jtkorhonen@0 76 QVBoxLayout *localRepoLayout;
jtkorhonen@0 77 QVBoxLayout *parentsLayout;
jtkorhonen@0 78 QListWidget *localRepoHgParentsList;
jtkorhonen@0 79 QLabel *parentsLabel;
jtkorhonen@32 80 QMenu *userListMenu;
jtkorhonen@32 81 QAction *copyCommentAct;
jtkorhonen@0 82
jtkorhonen@0 83 QGroupBox *grpWorkFolder;
jtkorhonen@0 84 QHBoxLayout *workFolderLayout;
jtkorhonen@0 85 QGroupBox *grpViewFileTypes;
jtkorhonen@0 86 QVBoxLayout *fileTypesLayout;
jtkorhonen@0 87 QCheckBox *chkViewFileTypes[NUM_STAT_FILE_TYPES];
jtkorhonen@0 88
jtkorhonen@0 89 QVBoxLayout *historyLayout;
jtkorhonen@0 90
jtkorhonen@0 91 QVBoxLayout *headsLayout;
jtkorhonen@0 92
jtkorhonen@0 93 QString findRev(QString itemText, QString& smallRev);
jtkorhonen@0 94 QStringList splitChangeSets(QString chgSetsStr);
Chris@43 95 Changesets parseChangeSets(QString changeSetsStr);
Chris@43 96
jtkorhonen@0 97 int findLineStart(int nowIndex, QString chgSetsStr);
jtkorhonen@32 98 void contextMenuEvent (QContextMenuEvent * event);
jtkorhonen@0 99 };
jtkorhonen@0 100
jtkorhonen@0 101 #endif // HGEXPWIDGET_H