source: trunk/tools/designer/src/lib/sdk/abstractdialoggui.cpp@ 846

Last change on this file since 846 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 7.3 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4** All rights reserved.
5** Contact: Nokia Corporation ([email protected])
6**
7** This file is part of the Qt Designer of the Qt Toolkit.
8**
9** $QT_BEGIN_LICENSE:LGPL$
10** Commercial Usage
11** Licensees holding valid Qt Commercial licenses may use this file in
12** accordance with the Qt Commercial License Agreement provided with the
13** Software or, alternatively, in accordance with the terms contained in
14** a written agreement between you and Nokia.
15**
16** GNU Lesser General Public License Usage
17** Alternatively, this file may be used under the terms of the GNU Lesser
18** General Public License version 2.1 as published by the Free Software
19** Foundation and appearing in the file LICENSE.LGPL included in the
20** packaging of this file. Please review the following information to
21** ensure the GNU Lesser General Public License version 2.1 requirements
22** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23**
24** In addition, as a special exception, Nokia gives you certain additional
25** rights. These rights are described in the Nokia Qt LGPL Exception
26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you have questions regarding the use of this file, please contact
37** Nokia at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#include "abstractdialoggui_p.h"
43
44QT_BEGIN_NAMESPACE
45
46/*!
47 \class QDesignerDialogGuiInterface
48 \since 4.4
49 \internal
50
51 \brief The QDesignerDialogGuiInterface allows integrations of \QD to replace the
52 message boxes displayed by \QD by custom dialogs.
53
54 \inmodule QtDesigner
55
56 QDesignerDialogGuiInterface provides virtual functions that can be overwritten
57 to display message boxes and file dialogs.
58 \sa QMessageBox, QFileDialog
59*/
60
61/*!
62 \enum QDesignerDialogGuiInterface::Message
63
64 This enum specifies the context from within the message box is called.
65
66 \value FormLoadFailureMessage Loading of a form failed
67 \value UiVersionMismatchMessage Attempt to load a file created with an old version of Designer
68 \value ResourceLoadFailureMessage Resources specified in a file could not be found
69 \value TopLevelSpacerMessage Spacer items detected on a container without layout
70 \value PropertyEditorMessage Messages of the propert yeditor
71 \value SignalSlotEditorMessage Messages of the signal / slot editor
72 \value FormEditorMessage Messages of the form editor
73 \value PreviewFailureMessage A preview could not be created
74 \value PromotionErrorMessage Messages related to promotion of a widget
75 \value ResourceEditorMessage Messages of the resource editor
76 \value ScriptDialogMessage Messages of the script dialog
77 \value SignalSlotDialogMessage Messages of the signal slot dialog
78 \value OtherMessage Unspecified context
79*/
80
81/*!
82 Constructs a QDesignerDialogGuiInterface object.
83*/
84
85QDesignerDialogGuiInterface::QDesignerDialogGuiInterface()
86{
87}
88
89/*!
90 Destroys the QDesignerDialogGuiInterface object.
91*/
92QDesignerDialogGuiInterface::~QDesignerDialogGuiInterface()
93{
94}
95
96/*!
97 \fn QMessageBox::StandardButton QDesignerDialogGuiInterface::message(QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
98
99 Opens a message box as child of \a parent within the context \a context, using \a icon, \a title, \a text, \a buttons and \a defaultButton
100 and returns the button chosen by the user.
101*/
102
103/*!
104 \fn QString QDesignerDialogGuiInterface::getExistingDirectory(QWidget *parent, const QString &caption, const QString &dir, QFileDialog::Options options)
105
106 Opens a file dialog as child of \a parent using the parameters \a caption, \a dir and \a options that prompts the
107 user for an existing directory. Returns a directory selected by the user.
108*/
109
110/*!
111 \fn QString QDesignerDialogGuiInterface::getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options)
112
113 Opens a file dialog as child of \a parent using the parameters \a caption, \a dir, \a filter, \a selectedFilter and \a options
114 that prompts the user for an existing file. Returns a file selected by the user.
115*/
116
117/*!
118 \fn QStringList QDesignerDialogGuiInterface::getOpenFileNames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options)
119
120 Opens a file dialog as child of \a parent using the parameters \a caption, \a dir, \a filter, \a selectedFilter and \a options
121 that prompts the user for a set of existing files. Returns one or more existing files selected by the user.
122*/
123
124/*!
125 Opens a file dialog with image browsing capabilities as child of \a parent using the parameters \a caption, \a dir, \a filter, \a selectedFilter and \a options
126 that prompts the user for an existing file. Returns a file selected by the user.
127
128 The default implementation simply calls getOpenFileName(). On platforms that do not support an image preview in the QFileDialog,
129 the function can be reimplemented to provide an image browser.
130
131 \since 4.5
132*/
133
134QString QDesignerDialogGuiInterface::getOpenImageFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
135{
136 return getOpenFileName(parent, caption, dir, filter, selectedFilter, options);
137}
138
139/*!
140 Opens a file dialog with image browsing capabilities as child of \a parent using the parameters \a caption, \a dir, \a filter, \a selectedFilter and \a options
141 that prompts the user for a set of existing files. Returns one or more existing files selected by the user.
142
143 The default implementation simply calls getOpenFileNames(). On platforms that do not support an image preview in the QFileDialog,
144 the function can be reimplemented to provide an image browser.
145
146 \since 4.5
147*/
148
149QStringList QDesignerDialogGuiInterface::getOpenImageFileNames(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
150{
151 return getOpenImageFileNames(parent, caption, dir, filter, selectedFilter, options);
152}
153
154/*!
155 \fn QString QDesignerDialogGuiInterface::getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedFilter, QFileDialog::Options)
156
157 Opens a file dialog as child of \a parent using the parameters \a caption, \a dir, \a filter, \a selectedFilter and \a options
158 that prompts the user for a file. Returns a file selected by the user. The file does not have to exist.
159*/
160
161QT_END_NAMESPACE
Note: See TracBrowser for help on using the repository browser.