1
/****************************************************************************
3
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
5
** This file is part of the designer application of the Qt Toolkit.
7
** This file may be distributed under the terms of the Q Public License
8
** as defined by Trolltech AS of Norway and appearing in the file
9
** LICENSE.QPL included in the packaging of this file.
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.GPL included in the
14
** packaging of this file.
16
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
17
** information about Qt Commercial License Agreements.
18
** See http://www.trolltech.com/qpl/ for QPL licensing information.
19
** See http://www.trolltech.com/gpl/ for GPL licensing information.
21
** Contact info@trolltech.com if any conditions of this licensing are
24
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
25
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27
****************************************************************************/
29
#include "abstractformwindowcursor.h"
32
\class QDesignerFormWindowCursorInterface
33
\brief The QDesignerFormWindowCursorInterface class provides an interface to the form window's
39
\enum QDesignerFormWindowCursorInterface::MoveOperation
41
This enum describes the types of text cursor operation that can occur in a form window.
43
\value NoMove The cursor does not move.
44
\value Start Moves the cursor to the start of the focus chain.
45
\value End Moves the cursor to the end of the focus chain.
46
\value Next Moves the cursor to the next widget in the focus chain.
47
\value Prev Moves the cursor to the previous widget in the focus chain.
48
\value Left The cursor moves to the left.
49
\value Right The cursor moves to the right.
50
\value Up The cursor moves upwards.
51
\value Down The cursor moves downwards.
55
\enum QDesignerFormWindowCursorInterface::MoveMode
57
This enum describes the different modes that are used when the text cursor moves.
59
\value MoveAnchor The anchor moves with the cursor to its new location.
60
\value KeepAnchor The anchor remains at the cursor's old location.
64
Returns true if the specified \a widget is selected; otherwise returns false.*/
65
bool QDesignerFormWindowCursorInterface::isWidgetSelected(QWidget *widget) const
67
for (int index=0; index<selectedWidgetCount(); ++index) {
68
if (selectedWidget(index) == widget)
76
\fn virtual QDesignerFormWindowCursorInterface::~QDesignerFormWindowCursorInterface()
78
Destroys the cursor interface.
82
\fn virtual QDesignerFormWindowInterface *QDesignerFormWindowCursorInterface::formWindow() const = 0
84
Returns the interface to the form window associated with this interface.
88
\fn virtual bool QDesignerFormWindowCursorInterface::movePosition(MoveOperation operation, MoveMode mode) = 0
90
Performs the given \a operation on the cursor using the specified \a mode, and returns true
91
if it completed successfully; otherwise returns false.
95
\fn virtual int QDesignerFormWindowCursorInterface::position() const = 0
97
Returns the cursor position.
103
\fn virtual void QDesignerFormWindowCursorInterface::setPosition(int position, MoveMode mode = MoveAnchor) = 0
105
Sets the position of the cursor to the given \a position using the \a mode to specify
106
how it is moved there.
112
\fn virtual QWidget *QDesignerFormWindowCursorInterface::current() const = 0
114
Returns the current widget in the form.
120
\fn virtual int QDesignerFormWindowCursorInterface::widgetCount() const = 0
122
Returns the number of widgets in the form window.
126
\fn virtual QWidget *QDesignerFormWindowCursorInterface::widget(int index) const = 0
128
Returns the widget with the given \a index in the list of widgets on the form.
134
\fn virtual bool QDesignerFormWindowCursorInterface::hasSelection() const = 0
136
Returns true if the form window contains a selection; otherwise returns false.
140
\fn virtual int QDesignerFormWindowCursorInterface::selectedWidgetCount() const = 0
142
Returns the number of selected widgets in the form window.
146
\fn virtual QWidget *QDesignerFormWindowCursorInterface::selectedWidget(int index) const = 0
148
Returns the widget with the given \a index in the list of selected widgets.
154
\fn virtual void QDesignerFormWindowCursorInterface::setProperty(const QString &name, const QVariant &value) = 0
156
Sets the property with the given \a name in the current widget to the specified \a value.
158
\sa setWidgetProperty(), resetWidgetProperty()
162
\fn virtual void QDesignerFormWindowCursorInterface::setWidgetProperty(QWidget *widget, const QString &name, const QVariant &value) = 0
164
Sets the property with the given \a name in the \a widget to the specified \a value.
166
\sa resetWidgetProperty(), setProperty()
170
\fn virtual void QDesignerFormWindowCursorInterface::resetWidgetProperty(QWidget *widget, const QString &name) = 0
172
Resets the property with the given \a name in the specified \a widget to its default value.