File indexing completed on 2024-04-21 05:41:05

0001 /*
0002     SPDX-FileCopyrightText: 2019-2020 Nikolai Krasheninnikov <nkrasheninnikov@yandex.ru>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef SVNLOGDIALOG_H
0008 #define SVNLOGDIALOG_H
0009 
0010 #include <QDialog>
0011 #include <QVector>
0012 
0013 #include "svncommands.h"
0014 
0015 #include "ui_svnlogdialog.h"
0016 
0017 class SvnLogDialog : public QDialog {
0018     Q_OBJECT
0019 public:
0020     SvnLogDialog(const QString& contextDir, QWidget *parent = nullptr);
0021     virtual ~SvnLogDialog() override;
0022 
0023 public Q_SLOTS:
0024     void setCurrentRevision(ulong revision);
0025     void refreshLog();
0026     void on_tLog_currentCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
0027 
0028 Q_SIGNALS:
0029     void errorMessage(const QString& msg);
0030     void operationCompletedMessage(const QString& msg);
0031     void diffAgainstWorkingCopy(const QString& localFilePath, ulong rev);
0032     void diffBetweenRevs(const QString& remoteFilePath, ulong rev1, ulong rev2);
0033 
0034 private Q_SLOTS:
0035     void showContextMenuLog(const QPoint &pos);
0036     void showContextMenuChangesList(const QPoint &pos);
0037     void updateRepoToRevision();
0038     void revertRepoToRevision();
0039     void revertFileToRevision();
0040 
0041 private:
0042     Ui::SvnLogDialog m_ui;
0043     QSharedPointer< QVector<logEntry> > m_log;
0044     const QString m_contextDir;
0045     uint m_logLength;
0046     QAction *m_updateToRev;
0047     QAction *m_revertToRev;
0048     QAction *m_diffFilePrev;
0049     QAction *m_diffFileCurrent;
0050     QAction *m_fileRevertToRev;
0051 };
0052 
0053 #endif  // SVNLOGDIALOG_H