Source

pynoto / src / Designer / DesignerWidget.h

Full commit
#ifndef _DESIGNERWIDGET_H_
#define _DESIGNERWIDGET_H_

#include <QWidget>
#include <QAbstractButton>

namespace Ui {
    class DesignerWidget;
}

namespace qdesigner_internal {
    class QDesignerIntegration;
    class FormWindowBase;
}

class QDesignerFormWindowInterface;
class QDesignerFormEditorInterface;
class QAbstractTableModel;
class StatusBar;
class QDesignerWidgetBoxInterface;
class QDesignerObjectInspectorInterface;
class QDesignerPropertyEditorInterface;
class QDesignerActionEditorInterface;

namespace Project { class IProject; }

namespace Designer
{

class DesignerWidget : public QWidget
{
    Q_OBJECT
public:
    DesignerWidget(const QString& fileName, QWidget *parent = 0);
    virtual ~DesignerWidget();
public:
    void init();
    QWidget* header();
    QString fileName();
    virtual bool save();
    virtual bool load();
    virtual bool reload();
    bool isModified();

    bool isUndoAvailable();
    bool isRedoAvailable();
    bool canCopy();
    bool canPaste();

    void activate();
    void renderPyFile();
public slots:
    void undo();
    void redo();
    void copy();
    void cut();
    void paste();
    void del();
signals:
    void modificationChanged(bool);

protected:
    void showEvent(QShowEvent *);
private slots:
    void onUndoAvailable();
    void onRedoAvailable();
    void onCopyAvailable();
    void onPasteAvailable();

    void onFormChanged();
    void onSwitchWidgets();
    void onSwitchTabOrder();
    void onSwitchBuddies();
    void onNavigateToSlot(const QString&, const QString& , const QStringList&);
signals:
    void copyAvailable(bool);
    void undoAvailable(bool);
    void redoAvailable(bool);
    void pasteAvailable(bool);
    void severityChanged(int sev);
    void errorListChanged(QAbstractTableModel*);
    void activated(QDesignerFormWindowInterface*);
private:
    Ui::DesignerWidget *_ui;
    qdesigner_internal::QDesignerIntegration *_designer;
    QAction *_editTabAction;
    QAction *_editBuddies;
    QString _fileName;
    qdesigner_internal::FormWindowBase * _form;
    QObject * _menu;

    QDesignerWidgetBoxInterface *_wb;
    QDesignerObjectInspectorInterface *_oi;
    QDesignerPropertyEditorInterface * _pe;
    QDesignerActionEditorInterface *_ae;

    Project::IProject * _project;
};

}

#endif