Commit 9664cf85 authored by Julien Wintz's avatar Julien Wintz
Browse files

Towards a more styleable dtk.

parent aa3e9564
/* dtkComposerSceneModel.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:30:18 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Jul 12 10:46:56 2012 (+0200)
* By: Julien Wintz
* Update #: 915
*/
/* Commentary:
*
*/
/* Change log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkComposerNode.h"
#include "dtkComposerScene.h"
......@@ -244,3 +239,6 @@ int dtkComposerSceneModel::columnCount(const QModelIndex& parent) const
{
return 1;
}
//
// dtkComposerSceneModel.cpp ends here
/* dtkComposerSceneModel.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:22:50 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Apr 11 10:08:37 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 31
*/
/* Commentary:
*
*/
/* Change log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
......@@ -53,3 +48,6 @@ public:
private:
dtkComposerSceneModelPrivate *d;
};
//
// dtkComposerSceneModel.h ends here
/* dtkComposerSceneView.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:25:21 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Nov 8 13:50:29 2012 (+0100)
* By: Julien Wintz
* Update #: 188
*/
/* Commentary:
*
*/
/* Change log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkComposerScene.h"
#include "dtkComposerSceneModel.h"
......@@ -79,3 +74,6 @@ void dtkComposerSceneView::selectionChanged(const QItemSelection& selected, cons
d->scene->blockSignals(false);
}
//
// dtkComposerSceneView.cpp ends here
/* dtkComposerSceneView.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:23:02 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Apr 11 10:08:01 2013 (+0200)
* By: Thibaud Kloczko
* Update #: 34
*/
/* Commentary:
*
*/
/* Change log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
......@@ -31,7 +26,7 @@ class DTKCOMPOSER_EXPORT dtkComposerSceneView : public QTreeView
Q_OBJECT
public:
dtkComposerSceneView(QWidget *parent = 0);
dtkComposerSceneView(QWidget *parent = 0);
~dtkComposerSceneView(void);
public:
......@@ -43,9 +38,6 @@ public:
public slots:
void clearSelection(void);
// public slots:
// void select(QGraphicsItem *item);
protected slots:
void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
......@@ -53,3 +45,5 @@ private:
dtkComposerSceneViewPrivate *d;
};
//
// dtkComposerSceneView.h ends here
/* dtkComposerSceneView.cpp ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:25:21 2012 (+0100)
* Version: $Id$
* Last-Updated: Thu Nov 8 13:50:29 2012 (+0100)
* By: Julien Wintz
* Update #: 188
*/
/* Commentary:
*
*/
/* Change log:
*
*/
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#include "dtkComposerScene.h"
#include "dtkComposerSceneModel.h"
......@@ -79,3 +74,6 @@ void dtkComposerSceneView::selectionChanged(const QItemSelection& selected, cons
d->scene->blockSignals(false);
}
//
// dtkComposerSceneView.cpp ends here
/* dtkComposerSceneView.h ---
*
* Author: Julien Wintz
* Copyright (C) 2008-2011 - Julien Wintz, Inria.
* Created: Sun Feb 5 15:23:02 2012 (+0100)
* Version: $Id$
* Last-Updated: Mon Apr 16 12:18:10 2012 (+0200)
* By: Julien Wintz
* Update #: 33
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#ifndef DTKCOMPOSERSCENEVIEW_H
#define DTKCOMPOSERSCENEVIEW_H
// Version: $Id$
//
//
// Commentary:
//
//
// Change Log:
//
//
// Code:
#pragma once
#include <dtkComposerSupportExport.h>
......@@ -32,7 +26,7 @@ class DTKCOMPOSERSUPPORT_EXPORT dtkComposerSceneView : public QTreeView
Q_OBJECT
public:
dtkComposerSceneView(QWidget *parent = 0);
dtkComposerSceneView(QWidget *parent = 0);
~dtkComposerSceneView(void);
public:
......@@ -44,9 +38,6 @@ public:
public slots:
void clearSelection(void);
// public slots:
// void select(QGraphicsItem *item);
protected slots:
void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
......@@ -54,4 +45,5 @@ private:
dtkComposerSceneViewPrivate *d;
};
#endif
//
// dtkComposerSceneView.h ends here
......@@ -38,24 +38,22 @@ dtkViewManager::dtkViewManager(QWidget *parent) : QFrame(parent), d(new dtkViewM
view_control->setLayout(d->view_layout);
view_control->setList(d->view_list);
QFrame *frame = new QFrame;
frame->setAutoFillBackground(true);
frame->setFixedWidth(300);
QVBoxLayout *layout = new QVBoxLayout(frame);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(view_control);
layout->addWidget(d->view_list);
layout->addWidget(d->view_inspector);
QSplitter *inner = new QSplitter(Qt::Vertical, this);
inner->setHandleWidth(2);
inner->addWidget(view_control);
inner->addWidget(d->view_list);
inner->addWidget(d->view_inspector);
QSplitter *splitter = new QSplitter(this);
splitter->setHandleWidth(2);
splitter->addWidget(inner);
splitter->addWidget(d->view_layout);
splitter->setSizes(QList<int>() << 300 << parent->size().width() - 300);
QHBoxLayout *main_layout = new QHBoxLayout(this);
main_layout->setContentsMargins(0, 0, 0, 0);
main_layout->setSpacing(0);
main_layout->addWidget(frame);
main_layout->addWidget(d->view_layout);
// Behaviour
main_layout->addWidget(splitter);
connect(d->view_layout, SIGNAL(focused(dtkViewWidget *)), this, SIGNAL(focused(dtkViewWidget *)));
connect(d->view_layout, SIGNAL(focused(dtkViewWidget *)), this, SLOT(onViewFocused(dtkViewWidget *)));
......
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