Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/designer/src/uitools/quiloader.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the Qt Designer of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    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.
     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.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    260260                const int col_cnt = tablew->columnCount();
    261261                for (int j = 0; j < col_cnt; ++j)
    262                     reTranslateTableItem(tablew->verticalHeaderItem(j), m_className);
     262                    reTranslateTableItem(tablew->alHeaderItem(j), m_className);
    263263                for (int i = 0; i < row_cnt; ++i) {
    264                     reTranslateTableItem(tablew->horizontalHeaderItem(i), m_className);
     264                    reTranslateTableItem(tablew->alHeaderItem(i), m_className);
    265265                    for (int j = 0; j < col_cnt; ++j)
    266266                        reTranslateTableItem(tablew->item(i, j), m_className);
     
    573573    \inmodule QtUiTools
    574574
    575     \brief The QUiLoader class allows standalone applications dynamically
    576     create user interfaces at run-time using the information stored in
    577     .ui files or specified plugin paths.
    578 
    579     In addition, you can customize of creating an user interface by
     575    \brief The QUiLoader class
     576   
     577    plugin paths.
     578
     579    In addition, you can customize on user interface by
    580580    deriving your own loader class.
    581581
    582     If you have a custom component or an application that embeds Qt
    583     Designer, you can also use the QFormBuilder class provided by the
    584     QtDesigner module to create user interfaces from .ui files.
    585 
    586     The QUiLoader class provides a collection of functions that allows
    587     you to create widgets based on the information stored in \c .ui
    588     files (created with Qt Designer) or available in the specified
    589     plugin paths. The specified plugin paths can be retrieved using
    590     the pluginPaths() function. You can retrieve the contents of an \c
    591     .ui file using the load() function. For example:
     582    If you have a custom component or an application that embeds
     583    e
     584    files.
     585
     586    The QUiLoader class provides a collection of functions
     587   
     588   
     589    p
     590   
     591    example:
    592592
    593593    \snippet doc/src/snippets/quiloader/mywidget.cpp 0
    594594
    595     By including the user interface in the form's resources (\c myform.qrc),
    596     we ensure that it will be present at run-time:
     595    By including the user interface in the form's resources (\c myform.qrc),
     596    ensure that it will be present at run-time:
    597597
    598598    \quotefile doc/src/snippets/quiloader/mywidget.qrc
    599599
    600     The availableWidgets() function returns a QStringList with the
    601     class names of the widgets available in the specified plugin
    602     paths. You can create any of these widgets using the
    603     createWidget() function. For example:
     600    The availableWidgets() function returns a QStringList with the class names
     601    of the widgets available in the specified plugin paths. To create these
     602    widgets, simply use the createWidget() function. For example:
    604603
    605604    \snippet doc/src/snippets/quiloader/main.cpp 0
    606605
    607     You can make a custom widget available to the loader using the
    608     addPluginPath() function, and you can remove all the available widgets
    609     by calling the clearPluginPaths() function.
    610 
    611     The createAction(), createActionGroup(), createLayout() and
    612     createWidget() functions are used internally by the QUiLoader class
    613     whenever it has to create an action, action group, layout or
    614     widget respectively. For that reason, you can subclass the QUiLoader
    615     class and reimplement these functions to intervene the process of
    616     constructing an user interface. For example, you might want to
    617     create a list of the actions created when loading a form or
    618     creating a custom widget.
    619 
    620     For a complete example using the QUiLoader class, see the \l
    621     {designer/calculatorbuilder}{Calculator Builder} example.
     606    To make a custom widget available to the loader, you can use the
     607    addPluginPath() function; to remove all available widgets, you can call
     608    the clearPluginPaths() function.
     609
     610    The createAction(), createActionGroup(), createLayout(), and createWidget()
     611    functions are used internally by the QUiLoader class whenever it has to
     612    create an action, action group, layout, or widget respectively. For that
     613    reason, you can subclass the QUiLoader class and reimplement these
     614    functions to intervene the process of constructing a user interface. For
     615    example, you might want to have a list of the actions created when loading
     616    a form or creating a custom widget.
     617
     618    For a complete example using the QUiLoader class, see the
     619    \l{Calculator Builder Example}.
    622620
    623621    \sa QtUiTools, QFormBuilder
     
    650648QUiLoader::~QUiLoader()
    651649{
    652     delete d_ptr;
    653 }
    654 
    655 /*!
    656     Loads a form from the given \a device and creates a new widget with the given
    657     \a parentWidget to hold its contents.
     650}
     651
     652/*!
     653    Loads a form from the given \a device and creates a new widget with the
     654    given \a parentWidget to hold its contents.
    658655
    659656    \sa createWidget()
     
    669666
    670667/*!
    671     Returns a list naming the paths the loader searches when locating
    672     custom widget plugins.
     668    Returns a list naming the paths
     669    custom widget plugins.
    673670
    674671    \sa addPluginPath(), clearPluginPaths()
     
    681678
    682679/*!
    683     Clears the list of paths the loader searches when locating
     680    Clears the list of paths when locating
    684681    plugins.
    685682
     
    693690
    694691/*!
    695     Adds the given \a path to the list of paths the loader searches
     692    Adds the given \a path to the list of paths
    696693    when locating plugins.
    697694
     
    705702
    706703/*!
    707   Creates a new widget with the given \a parent and \a name
    708   using the class specified by \a className. You can use this
    709   function to create any of the widgets returned by the
    710   availableWidgets() function.
    711 
    712   The function is also used internally by the QUiLoader class whenever
    713   it has to create a widget. For that reason, you can subclass the
    714   QUiLoader class and reimplement this function to intervene in the
    715   process of constructing a user interface or widget.
    716 
    717   \sa availableWidgets(), load()
     704 
     705 
     706 
     707
     708    The function is also used internally by the QUiLoader class whenever it
     709 
     710 
     711 
     712  t.
     713
     714  \sa availableWidgets(), load()
    718715*/
    719716QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)
     
    724721
    725722/*!
    726     Creates a new layout with the given \a parent and \a name
    727     using the class specified by \a className.
    728 
    729     The function is used internally by the QUiLoader class whenever it
    730     has to create a layout. For that reason, you can subclass the
    731     QUiLoader class and reimplement this function to intervene the
    732     process of constructing an user interface or widget.
     723    Creates a new layout with the given \a parent and \a name using the class
     724    specified by \a className.
     725
     726    The function is also used internally by the QUiLoader class whenever it
     727    creates a widget. Hence, you can subclass QUiLoader and reimplement this
     728    function to intervene process of constructing a user interface or widget.
     729    However, in your implementation, ensure that you call QUiLoader's version
     730    first.
    733731
    734732    \sa createWidget(), load()
     
    743741    Creates a new action group with the given \a parent and \a name.
    744742
    745     The function is used internally by the QUiLoader class whenever it
    746     has to create an action group. For that reason, you can subclass
    747     the QUiLoader class and reimplement this function to intervene the
    748     process of constructing an user interface or widget.
     743    The function is also used internally by the QUiLoader class whenever it
     744    creates a widget. Hence, you can subclass QUiLoader and reimplement this
     745    function to intervene process of constructing a user interface or widget.
     746    However, in your implementation, ensure that you call QUiLoader's version
     747    first.
    749748
    750749    \sa createAction(), createWidget(), load()
     
    759758    Creates a new action with the given \a parent and \a name.
    760759
    761     The function is used internally by the QUiLoader class whenever it
    762     has to create an action. For that reason, you can subclass the
    763     QUiLoader class and reimplement this function to intervene the
    764     process of constructing an user interface or widget.
     760    The function is also used internally by the QUiLoader class whenever it
     761    creates a widget. Hence, you can subclass QUiLoader and reimplement this
     762    function to intervene process of constructing a user interface or widget.
     763    However, in your implementation, ensure that you call QUiLoader's version
     764    first.
    765765
    766766    \sa createActionGroup(), createWidget(), load()
     
    773773
    774774/*!
    775     Returns a list naming the available widgets that can be built
    776     using the createWidget() function, i.e all the widgets specified
    777     within the given plugin paths.
     775    Returns a list naming
     776   
     777    plugin paths.
    778778
    779779    \sa pluginPaths(), createWidget()
     
    796796
    797797/*!
    798     Returns a list naming the available layouts that can be built
    799     using the createLayout() function
     798    \since 4.5
     799    Returns a list naming all available layouts that can be built using the
     800    createLayout() function
    800801
    801802    \sa createLayout()
    802     \since 4.5
    803803*/
    804804
     
    817817
    818818/*!
    819     Sets the working directory of the loader to \a dir. The loader
    820     looks for other resources, such as icons and resource files,
    821     in paths relative to this directory.
     819    Sets the working directory of the loader to \a dir. The loader
     820   
     821    this directory.
    822822
    823823    \sa workingDirectory()
     
    843843
    844844/*!
    845     Sets whether the execution of scripts is enabled to \a enabled.
     845   
    846846    \since 4.3
     847
     848
     849
     850
     851
     852
     853
     854
     855
     856
     857
     858
     859
     860
    847861    \internal
    848 */
    849 
    850 void QUiLoader::setScriptingEnabled(bool enabled)
    851 {
    852     Q_D(QUiLoader);
    853     d->builder.setScriptingEnabled(enabled);
    854 }
    855 
    856 /*!
    857    Returns whether the execution of scripts is enabled.
    858    \sa setScriptingEnabled()
    859    \since 4.3
    860    \internal
     862    \since 4.3
     863
     864    Returns true if execution of scripts is enabled; returns false otherwise.
     865
     866    \sa setScriptingEnabled()
    861867*/
    862868
     
    868874
    869875/*!
    870     Sets whether user interfaces loaded by this loader automatically
    871     retranslate themselves upon receiving a language change event or not,
    872     depending on \a enabled.
    873 
    874876    \since 4.5
     877
     878
     879
     880
     881
     882
    875883*/
    876884
     
    882890
    883891/*!
    884    Returns whether dynamic retranslation on language change is enabled.
    885    \sa setLanguageChangeEnabled()
    886    \since 4.5
     892    \since 4.5
     893
     894    Returns true if dynamic retranslation on language change is enabled;
     895    returns false otherwise.
     896
     897    \sa setLanguageChangeEnabled()
    887898*/
    888899
     
    895906/*!
    896907    \internal
    897 
    898     Sets whether user interfaces loaded by this loader are translated
    899     at all. Note that this is orthogonal to languageChangeEnabled.
    900 
    901908    \since 4.5
     909
     910
     911
     912
     913
     914
     915
    902916*/
    903917
     
    910924/*!
    911925    \internal
    912 
    913     Returns whether translation is enabled.
     926    \since 4.5
     927
     928    Returns true if translation is enabled; returns false otherwise.
     929
    914930    \sa setTranslationEnabled()
    915 
    916     \since 4.5
    917931*/
    918932
Note: See TracChangeset for help on using the changeset viewer.