| Last change
 on this file since 34 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.4 KB | 
      
      
| Line |  | 
|---|
| 1 | /**************************************************************************** | 
|---|
| 2 | ** $Id: qwerty.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 QWERTY_H | 
|---|
| 12 | #define QWERTY_H | 
|---|
| 13 |  | 
|---|
| 14 | #include <qwidget.h> | 
|---|
| 15 | #include <qmenubar.h> | 
|---|
| 16 | #include <qmultilineedit.h> | 
|---|
| 17 | #include <qprinter.h> | 
|---|
| 18 |  | 
|---|
| 19 | class Editor : public QWidget | 
|---|
| 20 | { | 
|---|
| 21 | Q_OBJECT | 
|---|
| 22 | public: | 
|---|
| 23 | Editor( QWidget *parent=0, const char *name="qwerty" ); | 
|---|
| 24 | ~Editor(); | 
|---|
| 25 |  | 
|---|
| 26 | void load( const QString& fileName, int code=-1 ); | 
|---|
| 27 |  | 
|---|
| 28 | public slots: | 
|---|
| 29 | void newDoc(); | 
|---|
| 30 | void load(); | 
|---|
| 31 | bool save(); | 
|---|
| 32 | void print(); | 
|---|
| 33 | void addEncoding(); | 
|---|
| 34 | void toUpper(); | 
|---|
| 35 | void toLower(); | 
|---|
| 36 | void font(); | 
|---|
| 37 | protected: | 
|---|
| 38 | void resizeEvent( QResizeEvent * ); | 
|---|
| 39 | void closeEvent( QCloseEvent * ); | 
|---|
| 40 |  | 
|---|
| 41 | private slots: | 
|---|
| 42 | void saveAsEncoding( int ); | 
|---|
| 43 | void openAsEncoding( int ); | 
|---|
| 44 | void textChanged(); | 
|---|
| 45 |  | 
|---|
| 46 | private: | 
|---|
| 47 | bool saveAs( const QString& fileName, int code=-1 ); | 
|---|
| 48 | void rebuildCodecList(); | 
|---|
| 49 | QMenuBar       *m; | 
|---|
| 50 | QMultiLineEdit *e; | 
|---|
| 51 | #ifndef QT_NO_PRINTER | 
|---|
| 52 | QPrinter        printer; | 
|---|
| 53 | #endif | 
|---|
| 54 | QPopupMenu     *save_as; | 
|---|
| 55 | QPopupMenu     *open_as; | 
|---|
| 56 | bool changed; | 
|---|
| 57 | }; | 
|---|
| 58 |  | 
|---|
| 59 | #endif // QWERTY_H | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.