Welcome to mirror list, hosted at ThFree Co, Russian Federation.

fb2dlgs.hpp « source - github.com/lintest/fb2edit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7707c623fd375a5d64cff30e3b87a824eb158ada (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
124
125
126
127
128
129
130
#ifndef FB2DLGS_H
#define FB2DLGS_H

#include <QDialog>
#include <QComboBox>

class FbCodeEdit;
class FbTextBase;
class FbTextEdit;

QT_BEGIN_NAMESPACE
class QAbstractItemModel;
class QLabel;
class QLineEdit;
class QTabWidget;
class QToolBar;
class QWebView;
QT_END_NAMESPACE

namespace Ui {
class FbFind;
class FbSetup;
}

class FbCodeFindDlg : public QDialog
{
    Q_OBJECT

public:
    explicit FbCodeFindDlg(FbCodeEdit &edit);
    virtual ~FbCodeFindDlg();

private slots:
    void find();

private:
    Ui::FbFind * ui;
    FbCodeEdit & m_edit;
};

class FbTextFindDlg : public QDialog
{
    Q_OBJECT

public:
    explicit FbTextFindDlg(FbTextEdit &edit);
    virtual ~FbTextFindDlg();

private slots:
    void find();

private:
    Ui::FbFind * ui;
    FbTextEdit & m_edit;
};

class FbNoteDlg : public QDialog
{
    Q_OBJECT
    
public:
    explicit FbNoteDlg(FbTextEdit &view);

private slots:
    void loadFinished();

private:
    QComboBox *m_key;
    FbTextBase *m_text;
    QLineEdit *m_title;
    QToolBar *m_toolbar;
};

class FbSetupDlg : public QDialog
{
    Q_OBJECT
public:
    explicit FbSetupDlg(QWidget *parent = 0);
private:
    Ui::FbSetup * ui;
};

#include <QVBoxLayout>
#include <QToolButton>
#include <QLineEdit>

class FbComboCtrl : public QLineEdit
{
    Q_OBJECT
public:
    explicit FbComboCtrl(QWidget *parent = 0);
    void setIcon(const QIcon &icon);
signals:
    void popup();
protected:
    void resizeEvent(QResizeEvent* event);
private:
    QToolButton *button;
};

class FbImageDlg : public QDialog
{
    Q_OBJECT

private:
    class FbTab: public QWidget
    {
    public:
        explicit FbTab(QWidget* parent, QAbstractItemModel *model = 0);
        QLabel *label;
        QComboBox *combo;
        FbComboCtrl *edit;
        QWebView *preview;
    };

public:
    explicit FbImageDlg(FbTextEdit *text);

private slots:
    void pictureActivated(const QString & text);
    void notebookChanged(int index);
    void selectFile();

private:
    QTabWidget *notebook;
    FbTab *tabFile;
    FbTab *tabPict;
};

#endif // FB2DLGS_H