source: trunk/examples/demo/textdrawing/textedit.h@ 203

Last change on this file since 203 was 160, checked in by dmik, 19 years ago

Imported table and iconview modules and a bunch of dependent examples from the official release 3.3.1 from Trolltech.

  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1/****************************************************************************
2** $Id: textedit.h 160 2006-12-11 20:15:57Z 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
17class QAction;
18class QComboBox;
19class QTabWidget;
20class QTextEdit;
21
22class TextEdit : public QMainWindow
23{
24 Q_OBJECT
25
26public:
27 TextEdit( QWidget *parent = 0, const char *name = 0 );
28
29 QTextEdit *currentEditor() const;
30 void load( const QString &f );
31
32
33public slots:
34 void fileNew();
35 void fileOpen();
36 void fileSave();
37 void fileSaveAs();
38 void filePrint();
39 void fileClose();
40 void fileExit();
41
42 void editUndo();
43 void editRedo();
44 void editCut();
45 void editCopy();
46 void editPaste();
47
48 void textBold();
49 void textUnderline();
50 void textItalic();
51 void textFamily( const QString &f );
52 void textSize( const QString &p );
53 void textStyle( int s );
54 void textColor();
55 void textAlign( QAction *a );
56
57 void fontChanged( const QFont &f );
58 void colorChanged( const QColor &c );
59 void alignmentChanged( int a );
60 void editorChanged( QWidget * );
61
62
63private:
64 void setupFileActions();
65 void setupEditActions();
66 void setupTextActions();
67 void doConnections( QTextEdit *e );
68
69 QAction *actionTextBold,
70 *actionTextUnderline,
71 *actionTextItalic,
72 *actionTextColor,
73 *actionAlignLeft,
74 *actionAlignCenter,
75 *actionAlignRight,
76 *actionAlignJustify;
77 QComboBox *comboStyle,
78 *comboFont,
79 *comboSize;
80 QTabWidget *tabWidget;
81 QMap<QTextEdit*, QString> filenames;
82
83};
84
85
86#endif
Note: See TracBrowser for help on using the repository browser.