summaryrefslogtreecommitdiffstats
path: root/src/smalldialogs.h
blob: 5791b13dc82fdb28d83fb2cc15b396356804314d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/***************************************************************************
 *   Copyright (C) 2005 by Joachim Eibl                                    *
 *   joachim.eibl at gmx.de                                                *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.           *
 ***************************************************************************/

#ifndef SMALLDIALOGS_H
#define SMALLDIALOGS_H

#include <qdialog.h>
#include "diff.h"

class OptionDialog;
class QComboBox;
class QCheckBox;
class QLineEdit;
class QLabel;

class OpenDialog : public QDialog
{
   Q_OBJECT
public:
   OpenDialog(
      QWidget* pParent, const QString& n1, const QString& n2, const QString& n3,
      bool bMerge, const QString& outputName, const char* slotConfigure, OptionDialog* pOptions  );

   QComboBox* m_pLineA;
   QComboBox* m_pLineB;
   QComboBox* m_pLineC;
   QComboBox* m_pLineOut;

   QCheckBox* m_pMerge;
   virtual void accept();
   virtual bool eventFilter(QObject* o, QEvent* e);
private:
   OptionDialog* m_pOptions;
   void selectURL( QComboBox* pLine, bool bDir, int i, bool bSave );
   bool m_bInputFileNameChanged;
private slots:
   void selectFileA();
   void selectFileB();
   void selectFileC();
   void selectDirA();
   void selectDirB();
   void selectDirC();
   void selectOutputName();
   void selectOutputDir();
   void internalSlot(int);
   void inputFilenameChanged();
   void slotSwapCopyNames(int);
signals:
   void internalSignal(bool);
};

class FindDialog : public QDialog
{
   Q_OBJECT
public:
   FindDialog(QWidget* pParent);

signals:
   void findNext();

public:
   QLineEdit* m_pSearchString;
   QCheckBox* m_pSearchInA;
   QCheckBox* m_pSearchInB;
   QCheckBox* m_pSearchInC;
   QCheckBox* m_pSearchInOutput;
   QCheckBox* m_pCaseSensitive;

   int currentLine;
   int currentPos;
   int currentWindow;
};


class RegExpTester : public QDialog
{
   Q_OBJECT
private:
   QLineEdit* m_pAutoMergeRegExpEdit;
   QLineEdit* m_pAutoMergeMatchResult;
   QLineEdit* m_pAutoMergeExampleEdit;
   QLineEdit* m_pHistoryStartRegExpEdit;
   QLineEdit* m_pHistoryStartMatchResult;
   QLineEdit* m_pHistoryStartExampleEdit;
   QLineEdit* m_pHistoryEntryStartRegExpEdit;
   QLineEdit* m_pHistorySortKeyOrderEdit;
   QLineEdit* m_pHistoryEntryStartExampleEdit;
   QLineEdit* m_pHistoryEntryStartMatchResult;
   QLineEdit* m_pHistorySortKeyResult;
   OptionDialog* m_pOptionDialog;
public:
   RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip, const QString& historyStartRegExpToolTip, 
                                   const QString& historyEntryStartRegExpToolTip, const QString& historySortKeyOrderToolTip  );
   void init( const QString& autoMergeRegExp, const QString& historyStartRegExp, const QString& historyEntryStartRegExp, const QString sortKeyOrder );
   QString autoMergeRegExp();
   QString historyStartRegExp();
   QString historyEntryStartRegExp();
   QString historySortKeyOrder();
public slots:
   void slotRecalc();
};

#endif