notesdemo.h Example File
content/notesdemo/notesdemo.h
#ifndef NOTESDEMO_H
#define NOTESDEMO_H
#include <QDialog>
#include <QContent>
class QDocumentSelector;
class QTextEdit;
class QStackedLayout;
class QTextDocument;
class NotesDemo : public QDialog
{
Q_OBJECT
public:
NotesDemo( QWidget *parent = 0, Qt::WindowFlags flags = 0 );
public slots:
virtual void done( int result );
private slots:
void newDocument();
void openDocument( const QContent &document );
private:
bool readContent( QTextDocument *document, QContent *content );
bool writeContent( QTextDocument *document, QContent *content );
QStackedLayout *layout;
QDocumentSelector *documentSelector;
QTextEdit *editor;
QContent currentDocument;
};
#endif
Copyright © 2009 Trolltech |
Trademarks |
Qt Extended 4.4.3 |