[go: up one dir, main page]

File: qaregexpwidget.hpp

package info (click to toggle)
regexplorer 0.1.3-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 332 kB
  • ctags: 222
  • sloc: cpp: 1,166; perl: 99; makefile: 45; sh: 32
file content (81 lines) | stat: -rw-r--r-- 1,724 bytes parent folder | download
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
// 
// $Id: qaregexpwidget.hpp,v 1.2 1999/08/16 02:01:39 amos Exp $
//
// Definition of QRegExpWidget class
//
// Jan Borsodi <amos@abn.hibu.no>
// Created on: <21-Jul-1999 21:22:47 amos>
//
// Copyright (C) 1999 Jan Borsodi.  All rights reserved.
//

#ifndef QREGEXPWIDGET_HPP
#define QREGEXPWIDGET_HPP

#include <qaregexp.hpp>

#include <qframe.h>
#include <qlayout.h>
#include <qwidget.h>
#include <qstring.h>
#include <qmultilinedit.h>
#include <qtextview.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qmainwindow.h>
#include <qpopupmenu.h>
#include <qsplitter.h>
#include <qlistbox.h>

class QaRegExpWidget : public QMainWindow
{
    Q_OBJECT
public:
    QaRegExpWidget( QWidget *parent = 0, const char *name = 0 );
    virtual ~QaRegExpWidget();

    void convertText( QString &s );
    QString toHtml( const QString &s );
    void updateMatch();
    void updateOutput();
    void updateOutputMultiple();

public slots:
    void textChange( const QString &t );
    void valueChange( int val );
    void valueChangeMultiple( int val );
    void multiTextChanged();
    void doNormal();
    void doMultiple();
    void doLoad();
    void doSave();
    void doCase();

private:
    QString wordCharacters();

    QVBoxLayout *Lay;
    QMultiLineEdit *Edit;
    QTextView *TextVu;
    QLabel *ErrLabel;
//    QSpinBox *Sub;
    QListBox *Sub;
    QListBox *Matches;
    QaRegExp Reg;
    QString EditString;
    QWidget *Central;
    bool Multiple;
    int MatchCount;
    int SubMatch;

    QPopupMenu *FileMenu;
    QPopupMenu *MatchMenu;
    QPopupMenu *ModesMenu;
    QPopupMenu *EditMenu;
    int MatchNormalID;
    int MatchMultipleID;
    int MatchCaseID;
    int SubValue;
};

#endif // QREGEXPWIDGET_HPP