Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

notesdemo.h Example File
content/notesdemo/notesdemo.h

    /****************************************************************************
    **
    ** This file is part of the Qt Extended Opensource Package.
    **
    ** Copyright (C) 2009 Trolltech ASA.
    **
    ** $QT_EXTENDED_DUAL_LICENSE$
    **
    ****************************************************************************/

    #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