%Module dtkWidgets

%Import QtCore/QtCoremod.sip
%Import QtWidgets/QtWidgetsmod.sip



class dtkViewWidget : public QWidget
{

%TypeHeaderCode
#include <dtkWidgetsExport.h>
#include <QtWidgets>
%End

public:
     dtkViewWidget(QWidget *parent /TransferThis/ = 0);

signals:
    void   focused();
    void unfocused();

public:
    virtual QWidget *widget();
    virtual QWidget *inspector();
};



class dtkViewManager: public QFrame {

%TypeHeaderCode
#include <dtkWidgets/dtkViewWidget.h>
#include <QtWidgets/QFrame>
%End

public:
    dtkViewManager(QWidget *parent /TransferThis/ = 0);

signals:
    void focused(dtkViewWidget *);

public slots:
    void clear();

public slots:
    void onViewFocused(dtkViewWidget *);
    void onViewUnfocused(dtkViewWidget *);

};


class dtkViewController : public QObject
{

%TypeHeaderCode

#include <dtkWidgetsExport.h>
#include <QtCore>
class dtkViewWidget;

%End

public:
    static dtkViewController *instance();

public:
    void insert(dtkViewWidget *);

public:
    dtkViewWidget *view(const QString& );

public:
    QStringList viewNames();

signals:
    void inserted(dtkViewWidget *, const QString&);

};
