Commit d3944424 authored by Julien Wintz's avatar Julien Wintz
Browse files

SIP wrapping enhanced.

parent ac8b307d
class dtkViewLayout : public QFrame {
%TypeHeaderCode
#include <dtkWidgets/dtkViewLayout.h>
#include <dtkWidgets/dtkViewLayoutItem.h>
#include <dtkWidgets/dtkViewWidget.h>
#include <QtWidgets/QFrame>
%End
public:
dtkViewLayout(QWidget *parent = 0);
public:
dtkViewLayoutItem *root();
dtkViewLayoutItem *current();
public:
void setCurrent(dtkViewLayoutItem *item);
signals:
void focused(dtkViewWidget *view);
void unfocused(dtkViewWidget *view);
public slots:
void clear();
};
class dtkViewLayoutItem : public QFrame {
%TypeHeaderCode
#include <dtkWidgets/dtkViewLayout.h>
#include <dtkWidgets/dtkViewLayoutItem.h>
#include <QtWidgets/QFrame>
%End
public:
dtkViewLayoutItem(dtkViewLayoutItem *parent = 0);
public:
dtkViewWidget *view();
public:
dtkViewLayoutItem *parent();
dtkViewLayoutItem *first();
dtkViewLayoutItem *second();
public:
void setOrientation(Qt::Orientation orientation);
void setSizes(QList<int> sizes);
public:
int canvasHeight();
int footerHeight();
int handleHeight();
int handleWidth();
public:
dtkViewLayout *layout();
};
......@@ -19,4 +19,6 @@ public slots:
void onViewFocused(dtkViewWidget *);
void onViewUnfocused(dtkViewWidget *);
public:
dtkViewLayout *layout();
};
......@@ -2,6 +2,8 @@
%Import QtWidgets/QtWidgetsmod.sip
%Include dtkViewController.sip
%Include dtkViewLayout.sip
%Include dtkViewLayoutItem.sip
%Include dtkViewManager.sip
%Include dtkViewWidget.sip
%Include dtkViewController.sip
......@@ -124,7 +124,9 @@ if(DTK_BUILD_WRAPPERS)
set(${PROJECT_NAME}_SIP_WRAPPERS
sip${PROJECT_NAME}dtkViewController.cpp
sip${PROJECT_NAME}dtkViewManager.cpp
sip${PROJECT_NAME}dtkViewWidget.cpp)
sip${PROJECT_NAME}dtkViewWidget.cpp
sip${PROJECT_NAME}dtkViewLayout.cpp
sip${PROJECT_NAME}dtkViewLayoutItem.cpp)
dtk_wrap_sip(${PROJECT_NAME} ${PROJECT_NAME}_SOURCES_WRAP dtkWidgets ${CMAKE_SOURCE_DIR}/sip/dtkWidgets/dtkWidgetsmod.sip "${${PROJECT_NAME}_SIP_WRAPPERS}" ${${PROJECT_NAME}_WRAP_DEPENDS})
endif(SIP_FOUND)
......
......@@ -91,5 +91,10 @@ void dtkViewManager::onViewUnfocused(dtkViewWidget *widget)
d->view_inspector->removeWidget(widget->inspector());
}
dtkViewLayout *dtkViewManager::layout(void)
{
return d->view_layout;
}
//
// dtkViewManager.cpp ends here
......@@ -18,6 +18,7 @@
#include <QtWidgets/QFrame>
class dtkViewLayout;
class dtkViewManagerPrivate;
class dtkViewWidget;
......@@ -26,7 +27,7 @@ class DTKWIDGETS_EXPORT dtkViewManager : public QFrame
Q_OBJECT
public:
dtkViewManager(QWidget *parent = 0);
dtkViewManager(QWidget *parent = 0);
~dtkViewManager(void);
signals:
......@@ -39,6 +40,9 @@ public slots:
void onViewFocused(dtkViewWidget *widget);
void onViewUnfocused(dtkViewWidget *widget);
public:
dtkViewLayout *layout(void);
private:
dtkViewManagerPrivate *d;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment