summaryrefslogtreecommitdiffstats
path: root/src/smalldialogs.h
blob: 026023a9f59ac78cb027bda80ceca31e8a52027a (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
121
122
123
/***************************************************************************
 *   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 <tqdialog.h>
#include "diff.h"

class OptionDialog;
class TQComboBox;
class TQCheckBox;
class TQLineEdit;
class TQLabel;

class OpenDialog : public TQDialog
{
   TQ_OBJECT
  
public:
   OpenDialog(
      TQWidget* pParent, const TQString& n1, const TQString& n2, const TQString& n3,
      bool bMerge, const TQString& outputName, const char* slotConfigure, OptionDialog* pOptions  );

   TQComboBox* m_pLineA;
   TQComboBox* m_pLineB;
   TQComboBox* m_pLineC;
   TQComboBox* m_pLineOut;

   TQCheckBox* m_pMerge;
   virtual void accept();
   virtual bool eventFilter(TQObject* o, TQEvent* e);
private:
   OptionDialog* m_pOptions;
   void selectURL( TQComboBox* 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 TQDialog
{
   TQ_OBJECT
  
public:
   FindDialog(TQWidget* pParent);

signals:
   void findNext();

public:
   TQLineEdit* m_pSearchString;
   TQCheckBox* m_pSearchInA;
   TQCheckBox* m_pSearchInB;
   TQCheckBox* m_pSearchInC;
   TQCheckBox* m_pSearchInOutput;
   TQCheckBox* m_pCaseSensitive;

   int currentLine;
   int currentPos;
   int currentWindow;
};


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

#endif