QtDesigner integration has been added

QtDesigner intergration has been added
This commit is contained in:
Arin Alexander
2017-04-07 21:01:51 +03:00
parent 0505801e3a
commit cd2e748a9b
25 changed files with 1662 additions and 37 deletions

View File

@@ -0,0 +1,10 @@
This is a new Designer integration, started on 28.02.2008.
The reason for it is the introduction of layout caching
in Qt 4.4, which unearthed a lot of mainwindow-size related
bugs in Designer and all integrations.
The goal of it is to have a closed layout chain from
integration top level to form window.
Friedemann

View File

@@ -0,0 +1,11 @@
INCLUDEPATH *= $$PWD $$PWD/..
SOURCES += $$PWD/widgethost.cpp \
$$PWD/sizehandlerect.cpp \
$$PWD/formresizer.cpp
HEADERS += $$PWD/widgethost.h \
$$PWD/sizehandlerect.h \
$$PWD/formresizer.h \
$$PWD/widgethostconstants.h \
$$PWD/../namespace_global.h

View File

@@ -0,0 +1,198 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "formresizer.h"
#include "sizehandlerect.h"
#include "widgethostconstants.h"
#include <QDebug>
#include <QDesignerFormWindowInterface>
#include <QResizeEvent>
#include <QPalette>
#include <QLayout>
#include <QFrame>
#include <QResizeEvent>
enum { debugFormResizer = 0 };
using namespace SharedTools::Internal;
FormResizer::FormResizer(QWidget *parent) :
QWidget(parent),
m_frame(new QFrame),
m_formWindow(0)
{
// Make the resize grip of a mainwindow form find us as resizable window.
setWindowFlags(windowFlags() | Qt::SubWindow);
setBackgroundRole(QPalette::Base);
QVBoxLayout *handleLayout = new QVBoxLayout(this);
handleLayout->setMargin(SELECTION_MARGIN);
handleLayout->addWidget(m_frame);
m_frame->setFrameStyle(QFrame::Panel | QFrame::Raised);
QVBoxLayout *layout = new QVBoxLayout(m_frame);
layout->setMargin(0);
// handles
m_handles.reserve(SizeHandleRect::Left);
for (int i = SizeHandleRect::LeftTop; i <= SizeHandleRect::Left; ++i) {
SizeHandleRect *shr = new SizeHandleRect(this, static_cast<SizeHandleRect::Direction>(i), this);
connect(shr, SIGNAL(mouseButtonReleased(QRect,QRect)), this, SIGNAL(formWindowSizeChanged(QRect,QRect)));
m_handles.push_back(shr);
}
setState(SelectionHandleActive);
updateGeometry();
}
void FormResizer::updateGeometry()
{
const QRect &geom = m_frame->geometry();
if (debugFormResizer)
qDebug() << "FormResizer::updateGeometry() " << size() << " frame " << geom;
const int w = SELECTION_HANDLE_SIZE;
const int h = SELECTION_HANDLE_SIZE;
const Handles::iterator hend = m_handles.end();
for (Handles::iterator it = m_handles.begin(); it != hend; ++it) {
SizeHandleRect *hndl = *it;;
switch (hndl->dir()) {
case SizeHandleRect::LeftTop:
hndl->move(geom.x() - w / 2, geom.y() - h / 2);
break;
case SizeHandleRect::Top:
hndl->move(geom.x() + geom.width() / 2 - w / 2, geom.y() - h / 2);
break;
case SizeHandleRect::RightTop:
hndl->move(geom.x() + geom.width() - w / 2, geom.y() - h / 2);
break;
case SizeHandleRect::Right:
hndl->move(geom.x() + geom.width() - w / 2, geom.y() + geom.height() / 2 - h / 2);
break;
case SizeHandleRect::RightBottom:
hndl->move(geom.x() + geom.width() - w / 2, geom.y() + geom.height() - h / 2);
break;
case SizeHandleRect::Bottom:
hndl->move(geom.x() + geom.width() / 2 - w / 2, geom.y() + geom.height() - h / 2);
break;
case SizeHandleRect::LeftBottom:
hndl->move(geom.x() - w / 2, geom.y() + geom.height() - h / 2);
break;
case SizeHandleRect::Left:
hndl->move(geom.x() - w / 2, geom.y() + geom.height() / 2 - h / 2);
break;
default:
break;
}
}
}
void FormResizer::update()
{
const Handles::iterator hend = m_handles.end();
for (Handles::iterator it = m_handles.begin(); it != hend; ++it) {
(*it)->update();
}
}
void FormResizer::setState(SelectionHandleState st)
{
if (debugFormResizer)
qDebug() << "FormResizer::setState " << st;
const Handles::iterator hend = m_handles.end();
for (Handles::iterator it = m_handles.begin(); it != hend; ++it)
(*it)->setState(st);
}
void FormResizer::setFormWindow(QDesignerFormWindowInterface *fw)
{
if (debugFormResizer)
qDebug() << "FormResizer::setFormWindow " << fw;
QVBoxLayout *layout = qobject_cast<QVBoxLayout *>(m_frame->layout());
Q_ASSERT(layout);
if (layout->count())
delete layout->takeAt(0);
m_formWindow = fw;
if (m_formWindow)
layout->addWidget(m_formWindow);
mainContainerChanged();
connect(fw, SIGNAL(mainContainerChanged(QWidget*)), this, SLOT(mainContainerChanged()));
}
void FormResizer::resizeEvent(QResizeEvent *event)
{
if (debugFormResizer)
qDebug() << ">FormResizer::resizeEvent" << event->size();
updateGeometry();
QWidget::resizeEvent(event);
if (debugFormResizer)
qDebug() << "<FormResizer::resizeEvent";
}
QSize FormResizer::decorationSize() const
{
const int lineWidth = m_frame->lineWidth();
const QMargins frameMargins = m_frame->contentsMargins();
const int margin = 2* SELECTION_MARGIN;
QSize size = QSize( margin, margin );
size += QSize( qMax( frameMargins.left(), lineWidth ), qMax( frameMargins.top(), lineWidth ) );
size += QSize( qMax( frameMargins.right(), lineWidth ), qMax( frameMargins.bottom(), lineWidth ) );
return size;
}
QWidget *FormResizer::mainContainer()
{
if (m_formWindow)
return m_formWindow->mainContainer();
return 0;
}
void FormResizer::mainContainerChanged()
{
const QSize maxWidgetSize = QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
if (const QWidget *mc = mainContainer()) {
// Set Maximum size which is not handled via a hint (as opposed to minimum size)
const QSize maxWidgetSize = QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
const QSize formMaxSize = mc->maximumSize();
QSize newMaxSize = maxWidgetSize;
if (formMaxSize != maxWidgetSize)
newMaxSize = formMaxSize + decorationSize();
if (debugFormResizer)
qDebug() << "FormResizer::mainContainerChanged" << mc << " Size " << mc->size()<< newMaxSize;
setMaximumSize(newMaxSize);
resize(decorationSize() + mc->size());
} else {
setMaximumSize(maxWidgetSize);
}
}

View File

@@ -0,0 +1,99 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef FORMRESIZER_H
#define FORMRESIZER_H
#include "namespace_global.h"
#include "widgethostconstants.h"
#include <QWidget>
#include <QVector>
QT_FORWARD_DECLARE_CLASS(QDesignerFormWindowInterface)
QT_FORWARD_DECLARE_CLASS(QFrame)
namespace SharedTools {
namespace Internal {
class SizeHandleRect;
/* A window to embed a form window interface as follows:
*
* Widget
* |
* +---+----+
* | |
* | |
* Handles QVBoxLayout [margin: SELECTION_MARGIN]
* |
* Frame [margin: lineWidth]
* |
* QVBoxLayout
* |
* QDesignerFormWindowInterface
*
* Can be embedded into a QScrollArea. */
class FormResizer : public QWidget
{
Q_OBJECT
public:
FormResizer(QWidget *parent = 0);
void updateGeometry();
void setState(SelectionHandleState st);
void update();
void setFormWindow(QDesignerFormWindowInterface *fw);
signals:
void formWindowSizeChanged(const QRect &oldGeo, const QRect &newGeo);
protected:
virtual void resizeEvent(QResizeEvent *event);
private slots:
void mainContainerChanged();
private:
QSize decorationSize() const;
QWidget *mainContainer();
QFrame *m_frame;
typedef QVector<SizeHandleRect*> Handles;
Handles m_handles;
QDesignerFormWindowInterface * m_formWindow;
};
}
} // namespace SharedTools
#endif // FORMRESIZER_H

View File

@@ -0,0 +1,188 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "sizehandlerect.h"
#include "widgethostconstants.h"
#include <QDesignerFormWindowInterface>
#include <QMouseEvent>
#include <QPainter>
#include <QFrame>
#include <QDebug>
enum { debugSizeHandle = 0 };
using namespace SharedTools::Internal;
SizeHandleRect::SizeHandleRect(QWidget *parent, Direction d, QWidget *resizable) :
QWidget(parent),
m_dir(d),
m_resizable(resizable),
m_state(SelectionHandleOff)
{
setBackgroundRole(QPalette::Text);
setAutoFillBackground(true);
setFixedSize(SELECTION_HANDLE_SIZE, SELECTION_HANDLE_SIZE);
setMouseTracking(false);
updateCursor();
}
void SizeHandleRect::updateCursor()
{
switch (m_dir) {
case Right:
case RightTop:
setCursor(Qt::SizeHorCursor);
return;
case RightBottom:
setCursor(Qt::SizeFDiagCursor);
return;
case LeftBottom:
case Bottom:
setCursor(Qt::SizeVerCursor);
return;
default:
break;
}
setCursor(Qt::ArrowCursor);
}
void SizeHandleRect::paintEvent(QPaintEvent *)
{
switch (m_state) {
case SelectionHandleOff:
break;
case SelectionHandleInactive: {
QPainter p(this);
p.setPen(Qt::red);
p.drawRect(0, 0, width() - 1, height() - 1);
}
break;
case SelectionHandleActive: {
QPainter p(this);
p.setPen(Qt::blue);
p.drawRect(0, 0, width() - 1, height() - 1);
}
break;
}
}
void SizeHandleRect::mousePressEvent(QMouseEvent *e)
{
e->accept();
if (e->button() != Qt::LeftButton)
return;
m_startSize = m_curSize = m_resizable->size();
m_startPos = m_curPos = m_resizable->mapFromGlobal(e->globalPos());
if (debugSizeHandle)
qDebug() << "SizeHandleRect::mousePressEvent" << m_startSize << m_startPos << m_curPos;
}
void SizeHandleRect::mouseMoveEvent(QMouseEvent *e)
{
if (!(e->buttons() & Qt::LeftButton))
return;
// Try resize with delta against start position.
// We don't take little deltas in consecutive move events as this
// causes the handle and the mouse cursor to become out of sync
// once a min/maxSize limit is hit. When the cursor reenters the valid
// areas, it will now snap to it.
m_curPos = m_resizable->mapFromGlobal(e->globalPos());
QSize delta = QSize(m_curPos.x() - m_startPos.x(), m_curPos.y() - m_startPos.y());
switch (m_dir) {
case Right:
case RightTop: // Only width
delta.setHeight(0);
break;
case RightBottom: // All dimensions
break;
case LeftBottom:
case Bottom: // Only height
delta.setWidth(0);
break;
default:
delta = QSize(0, 0);
break;
}
if (delta != QSize(0, 0))
tryResize(delta);
}
void SizeHandleRect::mouseReleaseEvent(QMouseEvent *e)
{
if (e->button() != Qt::LeftButton)
return;
e->accept();
if (m_startSize != m_curSize) {
const QRect startRect = QRect(0, 0, m_startPos.x(), m_startPos.y());
const QRect newRect = QRect(0, 0, m_curPos.x(), m_curPos.y());
if (debugSizeHandle)
qDebug() << "SizeHandleRect::mouseReleaseEvent" << startRect << newRect;
emit mouseButtonReleased(startRect, newRect);
}
}
void SizeHandleRect::tryResize(const QSize &delta)
{
// Try resize with delta against start position
QSize newSize = m_startSize + delta;
newSize = newSize.expandedTo(m_resizable->minimumSizeHint());
newSize = newSize.expandedTo(m_resizable->minimumSize());
newSize = newSize.boundedTo(m_resizable->maximumSize());
if (newSize == m_resizable->size())
return;
if (debugSizeHandle)
qDebug() << "SizeHandleRect::tryResize by (" << m_startSize << '+' << delta << ')' << newSize;
m_resizable->resize(newSize);
m_curSize = m_resizable->size();
}
void SizeHandleRect::setState(SelectionHandleState st)
{
if (st == m_state)
return;
switch (st) {
case SelectionHandleOff:
hide();
break;
case SelectionHandleInactive:
case SelectionHandleActive:
show();
raise();
break;
}
m_state = st;
}

View File

@@ -0,0 +1,82 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef SIZEHANDLERECT_H
#define SIZEHANDLERECT_H
#include "namespace_global.h"
#include "widgethostconstants.h"
#include <QWidget>
#include <QPoint>
namespace SharedTools {
namespace Internal {
class SizeHandleRect : public QWidget
{
Q_OBJECT
public:
enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left };
SizeHandleRect(QWidget *parent, Direction d, QWidget *resizable);
Direction dir() const { return m_dir; }
void updateCursor();
void setState(SelectionHandleState st);
signals:
void mouseButtonReleased(const QRect &, const QRect &);
protected:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
private:
void tryResize(const QSize &delta);
private:
const Direction m_dir;
QPoint m_startPos;
QPoint m_curPos;
QSize m_startSize;
QSize m_curSize;
QWidget *m_resizable;
SelectionHandleState m_state;
};
}
} // namespace SharedTools
#endif // SIZEHANDLERECT_H

View File

@@ -0,0 +1,111 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#include "widgethost.h"
#include "formresizer.h"
#include "widgethostconstants.h"
#include <QDesignerFormWindowInterface>
#include <QDesignerFormWindowCursorInterface>
#include <QPalette>
#include <QLayout>
#include <QFrame>
#include <QResizeEvent>
#include <QDebug>
using namespace SharedTools;
// ---------- WidgetHost
WidgetHost::WidgetHost(QWidget *parent, QDesignerFormWindowInterface *formWindow) :
QScrollArea(parent),
m_formWindow(0),
m_formResizer(new Internal::FormResizer)
{
setWidget(m_formResizer);
// Re-set flag (gets cleared by QScrollArea): Make the resize grip of a mainwindow form find the resizer as resizable window.
m_formResizer->setWindowFlags(m_formResizer->windowFlags() | Qt::SubWindow);
setFormWindow(formWindow);
}
WidgetHost::~WidgetHost()
{
if (m_formWindow)
delete m_formWindow;
}
void WidgetHost::setFormWindow(QDesignerFormWindowInterface *fw)
{
m_formWindow = fw;
if (!fw)
return;
m_formResizer->setFormWindow(fw);
setBackgroundRole(QPalette::Base);
m_formWindow->setAutoFillBackground(true);
m_formWindow->setBackgroundRole(QPalette::Background);
connect(m_formResizer, SIGNAL(formWindowSizeChanged(QRect, QRect)),
this, SLOT(fwSizeWasChanged(QRect, QRect)));
connect(m_formWindow, SIGNAL(destroyed(QObject*)), this, SLOT(formWindowDeleted(QObject*)));
}
QSize WidgetHost::formWindowSize() const
{
if (!m_formWindow || !m_formWindow->mainContainer())
return QSize();
return m_formWindow->mainContainer()->size();
}
void WidgetHost::fwSizeWasChanged(const QRect &, const QRect &)
{
// newGeo is the mouse coordinates, thus moving the Right will actually emit wrong height
emit formWindowSizeChanged(formWindowSize().width(), formWindowSize().height());
}
void WidgetHost::formWindowDeleted(QObject *object)
{
if (object == m_formWindow) m_formWindow = 0;
}
void WidgetHost::updateFormWindowSelectionHandles(bool active)
{
Internal::SelectionHandleState state = Internal::SelectionHandleOff;
const QDesignerFormWindowCursorInterface *cursor = m_formWindow->cursor();
if (cursor->isWidgetSelected(m_formWindow->mainContainer()))
state = active ? Internal::SelectionHandleActive : Internal::SelectionHandleInactive;
m_formResizer->setState(state);
}
QWidget *WidgetHost::integrationContainer() const
{
return m_formResizer;
}

View File

@@ -0,0 +1,80 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef WIDGETHOST_H
#define WIDGETHOST_H
#include "namespace_global.h"
#include <QScrollArea>
QT_FORWARD_DECLARE_CLASS(QDesignerFormWindowInterface)
namespace SharedTools {
namespace Internal {
class FormResizer;
}
/* A scroll area that embeds a Designer form window */
class WidgetHost : public QScrollArea
{
Q_OBJECT
public:
WidgetHost(QWidget *parent = 0, QDesignerFormWindowInterface *formWindow = 0);
virtual ~WidgetHost();
// Show handles if active and main container is selected.
void updateFormWindowSelectionHandles(bool active);
inline QDesignerFormWindowInterface *formWindow() const { return m_formWindow; }
QWidget *integrationContainer() const;
protected:
void setFormWindow(QDesignerFormWindowInterface *fw);
signals:
void formWindowSizeChanged(int, int);
private slots:
void fwSizeWasChanged(const QRect &, const QRect &);
void formWindowDeleted(QObject* object);
private:
QSize formWindowSize() const;
QDesignerFormWindowInterface *m_formWindow;
Internal::FormResizer *m_formResizer;
QSize m_oldFakeWidgetSize;
};
} // namespace SharedTools
#endif // WIDGETHOST_H

View File

@@ -0,0 +1,41 @@
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
**
**************************************************************************/
#ifndef WIDGETHOST_CONSTANTS_H
#define WIDGETHOST_CONSTANTS_H
namespace SharedTools {
namespace Internal {
enum { SELECTION_HANDLE_SIZE = 6, SELECTION_MARGIN = 10 };
enum SelectionHandleState { SelectionHandleOff, SelectionHandleInactive, SelectionHandleActive };
}
}
#endif // WIDGETHOST_CONSTANTS_H