| 1 | /****************************************************************************
|
|---|
| 2 | **
|
|---|
| 3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 4 | ** Contact: Qt Software Information ([email protected])
|
|---|
| 5 | **
|
|---|
| 6 | ** This file is part of the Qt Designer of the Qt Toolkit.
|
|---|
| 7 | **
|
|---|
| 8 | ** $QT_BEGIN_LICENSE:LGPL$
|
|---|
| 9 | ** Commercial Usage
|
|---|
| 10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
|---|
| 11 | ** accordance with the Qt Commercial License Agreement provided with the
|
|---|
| 12 | ** Software or, alternatively, in accordance with the terms contained in
|
|---|
| 13 | ** a written agreement between you and Nokia.
|
|---|
| 14 | **
|
|---|
| 15 | ** GNU Lesser General Public License Usage
|
|---|
| 16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
|---|
| 17 | ** General Public License version 2.1 as published by the Free Software
|
|---|
| 18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
|---|
| 19 | ** packaging of this file. Please review the following information to
|
|---|
| 20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
|---|
| 21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|---|
| 22 | **
|
|---|
| 23 | ** In addition, as a special exception, Nokia gives you certain
|
|---|
| 24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
|---|
| 25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|---|
| 26 | ** 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 are unsure which license is appropriate for your use, please
|
|---|
| 37 | ** contact the sales department at [email protected].
|
|---|
| 38 | ** $QT_END_LICENSE$
|
|---|
| 39 | **
|
|---|
| 40 | ****************************************************************************/
|
|---|
| 41 |
|
|---|
| 42 | #include "abstractdialoggui_p.h"
|
|---|
| 43 |
|
|---|
| 44 | QT_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 |
|
|---|
| 85 | QDesignerDialogGuiInterface::QDesignerDialogGuiInterface()
|
|---|
| 86 | {
|
|---|
| 87 | }
|
|---|
| 88 |
|
|---|
| 89 | /*!
|
|---|
| 90 | Destroys the QDesignerDialogGuiInterface object.
|
|---|
| 91 | */
|
|---|
| 92 | QDesignerDialogGuiInterface::~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 |
|
|---|
| 134 | QString 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 |
|
|---|
| 149 | QStringList 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 |
|
|---|
| 161 | QT_END_NAMESPACE
|
|---|