annotate src/historywidget.h @ 721:744933aba33a

Ensure black pen (otherwise this becomes invisible with macOS in dark mode)
author Chris Cannam
date Thu, 13 Dec 2018 11:07:12 +0000
parents ae67ea0af696
children
rev   line source
Chris@116 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@116 2
Chris@116 3 /*
Chris@116 4 EasyMercurial
Chris@116 5
Chris@116 6 Based on HgExplorer by Jari Korhonen
Chris@116 7 Copyright (c) 2010 Jari Korhonen
Chris@644 8 Copyright (c) 2013 Chris Cannam
Chris@644 9 Copyright (c) 2013 Queen Mary, University of London
Chris@116 10
Chris@116 11 This program is free software; you can redistribute it and/or
Chris@116 12 modify it under the terms of the GNU General Public License as
Chris@116 13 published by the Free Software Foundation; either version 2 of the
Chris@116 14 License, or (at your option) any later version. See the file
Chris@116 15 COPYING included with this distribution for more information.
Chris@116 16 */
Chris@116 17
Chris@116 18 #ifndef HISTORYWIDGET_H
Chris@116 19 #define HISTORYWIDGET_H
Chris@116 20
Chris@116 21 #include "changeset.h"
Chris@116 22
Chris@116 23 #include <QWidget>
Chris@133 24 #include <QSet>
Chris@513 25 #include <QCheckBox>
Chris@116 26
Chris@116 27 class Panned;
Chris@116 28 class Panner;
Chris@129 29 class UncommittedItem;
Chris@145 30 class QGraphicsScene;
Chris@558 31 class FindWidget;
Chris@116 32
Chris@116 33 class HistoryWidget : public QWidget
Chris@116 34 {
Chris@116 35 Q_OBJECT
Chris@116 36
Chris@116 37 public:
Chris@116 38 HistoryWidget();
Chris@116 39 virtual ~HistoryWidget();
Chris@116 40
Chris@153 41 void setCurrent(QStringList ids, QString branch, bool showUncommitted);
Chris@505 42 void setShowUncommitted(bool showUncommitted);
Chris@506 43 void setClosedHeadIds(QSet<QString> closed);
Chris@506 44
Chris@120 45 void parseNewLog(QString log);
Chris@120 46 void parseIncrementalLog(QString log);
Chris@134 47
Chris@134 48 bool haveNewItems() const { return !m_newIds.empty(); }
Chris@141 49
Chris@141 50 signals:
Chris@141 51 void commit();
Chris@141 52 void revert();
Chris@141 53 void diffWorkingFolder();
Chris@168 54 void showSummary();
Chris@153 55 void showWork();
Chris@311 56 void newBranch();
Chris@311 57 void noBranch();
Chris@141 58
Chris@141 59 void updateTo(QString id);
Chris@148 60 void diffToParent(QString id, QString parent);
Chris@289 61 void showSummary(Changeset *);
Chris@141 62 void diffToCurrent(QString id);
Chris@141 63 void mergeFrom(QString id);
Chris@278 64 void newBranch(QString id);
Chris@514 65 void closeBranch(QString id);
Chris@141 66 void tag(QString id);
Chris@513 67
Chris@513 68 private slots:
Chris@513 69 void showClosedChanged(bool);
Chris@555 70
Chris@555 71 public slots:
Chris@555 72 void setSearchText(QString);
Chris@608 73 void update();
Chris@608 74 void clear();
Chris@608 75
Chris@116 76 private:
Chris@116 77 Changesets m_changesets;
Chris@128 78 QStringList m_currentIds;
Chris@153 79 QString m_currentBranch;
Chris@133 80 QSet<QString> m_newIds;
Chris@506 81 QSet<QString> m_closedIds;
Chris@145 82 bool m_showUncommitted;
Chris@154 83 bool m_refreshNeeded;
Chris@116 84
Chris@558 85 FindWidget *m_findWidget;
Chris@116 86 Panned *m_panned;
Chris@116 87 Panner *m_panner;
Chris@513 88 QCheckBox *m_showClosedBranches;
Chris@116 89
Chris@555 90 QString m_searchText;
Chris@555 91
Chris@145 92 QGraphicsScene *scene();
Chris@116 93 void clearChangesets();
Chris@133 94 void replaceChangesets(Changesets);
Chris@133 95 void addChangesets(Changesets);
Chris@120 96 void layoutAll();
Chris@122 97 void setChangesetParents();
Chris@133 98 void updateNewAndCurrentItems();
Chris@141 99 void connectSceneSignals();
Chris@555 100 void updateSearchStatus();
Chris@116 101 };
Chris@116 102
Chris@116 103 #endif