Warning, file /sdk/cervisia/diffdialog.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  *  Copyright (C) 1999-2002 Bernd Gehrmann
0003  *                          bernd@mail.berlios.de
0004  *  Copyright (c) 2003-2007 Christian Loose <christian.loose@kdemail.net>
0005  *
0006  * This program is free software; you can redistribute it and/or modify
0007  * it under the terms of the GNU General Public License as published by
0008  * the Free Software Foundation; either version 2 of the License, or
0009  * (at your option) any later version.
0010  *
0011  * This program is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014  * GNU General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU General Public License
0017  * along with this program; if not, write to the Free Software
0018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0019  */
0020 
0021 #ifndef DIFFDIALOG_H
0022 #define DIFFDIALOG_H
0023 
0024 #include <QList>
0025 
0026 #include <QDialog>
0027 
0028 class QLabel;
0029 class QCheckBox;
0030 class KComboBox;
0031 class KConfig;
0032 class DiffItem;
0033 class DiffView;
0034 class OrgKdeCervisia5CvsserviceCvsserviceInterface;
0035 
0036 class DiffDialog : public QDialog
0037 {
0038     Q_OBJECT
0039 
0040 public:
0041     explicit DiffDialog(KConfig &config, QWidget *parent = nullptr, bool modal = false);
0042     ~DiffDialog() override;
0043 
0044     bool parseCvsDiff(OrgKdeCervisia5CvsserviceCvsserviceInterface *service, const QString &fileName, const QString &revA, const QString &revB);
0045 
0046 protected:
0047     void keyPressEvent(QKeyEvent *e) override;
0048 
0049 private slots:
0050     void toggleSynchronize(bool b);
0051     void comboActivated(int index);
0052     void backClicked();
0053     void forwClicked();
0054     void saveAsClicked();
0055     void slotHelp();
0056 
0057 private:
0058     void newDiffHunk(int &linenoA, int &linenoB, const QStringList &linesA, const QStringList &linesB);
0059     void callExternalDiff(const QString &extdiff,
0060                           OrgKdeCervisia5CvsserviceCvsserviceInterface *service,
0061                           const QString &fileName,
0062                           const QString &revA,
0063                           const QString &revB);
0064     void updateNofN();
0065     void updateHighlight(int newitem);
0066 
0067     QLabel *revlabel1, *revlabel2, *nofnlabel;
0068     QCheckBox *syncbox;
0069     KComboBox *itemscombo;
0070     QPushButton *backbutton, *forwbutton;
0071     DiffView *diff1, *diff2;
0072 
0073     QList<DiffItem *> items;
0074     int markeditem;
0075     KConfig &partConfig;
0076     QStringList m_diffOutput;
0077 };
0078 
0079 #endif
0080 
0081 // Local Variables:
0082 // c-basic-offset: 4
0083 // End: