1 /*
2     SPDX-FileCopyrightText: 2001-2004 Otto Bruggeman <otto.bruggeman@home.nl>
3     SPDX-FileCopyrightText: 2001-2003 John Firebaugh <jfirebaugh@kde.org>
4 
5     SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #ifndef KOMPAREURLDIALOG_H
9 #define KOMPAREURLDIALOG_H
10 
11 #include <KPageDialog>
12 
13 class FilesPage;
14 class FilesSettings;
15 class DiffPage;
16 class DiffSettings;
17 class ViewPage;
18 class ViewSettings;
19 
20 /**
21  * Definition of class KompareURLDialog.
22  * @author Otto Bruggeman
23  * @author John Firebaugh
24  */
25 class KompareURLDialog : public KPageDialog
26 {
27     Q_OBJECT
28 
29 public:
30     explicit KompareURLDialog(QWidget* parent = nullptr);
31     ~KompareURLDialog() override;
32 
33     QUrl getFirstURL() const;
34     QUrl getSecondURL() const;
35     QString encoding() const;
36 
37     void setFirstGroupBoxTitle(const QString& title);
38     void setSecondGroupBoxTitle(const QString& title);
39 
40     void setGroup(const QString& groupName);
41 
42     void setFirstURLRequesterMode(unsigned int mode);
43     void setSecondURLRequesterMode(unsigned int mode);
44 
45 public Q_SLOTS:
46     void accept() override;
47     void reject() override;
48 
49 private Q_SLOTS:
50     void slotEnableOk();
51 protected:
52     void showEvent(QShowEvent* event) override;
53 private:
54     FilesPage*     m_filesPage;
55     FilesSettings* m_filesSettings;
56     DiffPage*      m_diffPage;
57     DiffSettings*  m_diffSettings;
58     ViewPage*      m_viewPage;
59     ViewSettings*  m_viewSettings;
60 };
61 
62 #endif
63