Last change
on this file since 20 was 2, checked in by dmik, 20 years ago |
Imported xplatform parts of the official release 3.3.1 from Trolltech
|
-
Property svn:keywords
set to
Id
|
File size:
1.8 KB
|
Line | |
---|
1 | /****************************************************************************
|
---|
2 | ** $Id: textedit.h 2 2005-11-16 15:49:26Z dmik $
|
---|
3 | **
|
---|
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
---|
5 | **
|
---|
6 | ** This file is part of an example program for Qt. This example
|
---|
7 | ** program may be used, distributed and modified without limitation.
|
---|
8 | **
|
---|
9 | *****************************************************************************/
|
---|
10 |
|
---|
11 | #ifndef TEXTEDIT_H
|
---|
12 | #define TEXTEDIT_H
|
---|
13 |
|
---|
14 | #include <qmainwindow.h>
|
---|
15 | #include <qmap.h>
|
---|
16 |
|
---|
17 | class QAction;
|
---|
18 | class QComboBox;
|
---|
19 | class QTabWidget;
|
---|
20 | class QTextEdit;
|
---|
21 |
|
---|
22 | class TextEdit : public QMainWindow
|
---|
23 | {
|
---|
24 | Q_OBJECT
|
---|
25 |
|
---|
26 | public:
|
---|
27 | TextEdit( QWidget *parent = 0, const char *name = 0 );
|
---|
28 |
|
---|
29 | private:
|
---|
30 | void setupFileActions();
|
---|
31 | void setupEditActions();
|
---|
32 | void setupTextActions();
|
---|
33 | void load( const QString &f );
|
---|
34 | QTextEdit *currentEditor() const;
|
---|
35 | void doConnections( QTextEdit *e );
|
---|
36 |
|
---|
37 | private slots:
|
---|
38 | void fileNew();
|
---|
39 | void fileOpen();
|
---|
40 | void fileSave();
|
---|
41 | void fileSaveAs();
|
---|
42 | void filePrint();
|
---|
43 | void fileClose();
|
---|
44 | void fileExit();
|
---|
45 |
|
---|
46 | void editUndo();
|
---|
47 | void editRedo();
|
---|
48 | void editCut();
|
---|
49 | void editCopy();
|
---|
50 | void editPaste();
|
---|
51 |
|
---|
52 | void textBold();
|
---|
53 | void textUnderline();
|
---|
54 | void textItalic();
|
---|
55 | void textFamily( const QString &f );
|
---|
56 | void textSize( const QString &p );
|
---|
57 | void textColor();
|
---|
58 | void textAlign( QAction *a );
|
---|
59 |
|
---|
60 | void fontChanged( const QFont &f );
|
---|
61 | void colorChanged( const QColor &c );
|
---|
62 | void alignmentChanged( int a );
|
---|
63 | void editorChanged( QWidget * );
|
---|
64 |
|
---|
65 | private:
|
---|
66 | QAction *actionTextBold,
|
---|
67 | *actionTextUnderline,
|
---|
68 | *actionTextItalic,
|
---|
69 | *actionTextColor,
|
---|
70 | *actionAlignLeft,
|
---|
71 | *actionAlignCenter,
|
---|
72 | *actionAlignRight,
|
---|
73 | *actionAlignJustify;
|
---|
74 | QComboBox
|
---|
75 | *comboFont,
|
---|
76 | *comboSize;
|
---|
77 | QTabWidget *tabWidget;
|
---|
78 | QMap<QTextEdit*, QString> filenames;
|
---|
79 |
|
---|
80 | };
|
---|
81 |
|
---|
82 |
|
---|
83 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.