tools/designer/src/lib/sdk/abstractdialoggui.cpp
changeset 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the Qt Designer of the Qt Toolkit.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    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 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    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