/*!
    \example uitools/multipleinheritance
    \title Multiple Inheritance Example

    The Multiple Inheritance Example shows how to use a form created with \QD
    in an application by subclassing both QWidget and the user interface
    class, which is \c{Ui::CalculatorForm}.

    \image multipleinheritance-example.png

    To subclass the \c calculatorform.ui file and ensure that \c qmake
    processes it with the \c uic, we have to include \c calculatorform.ui
    in the \c .pro file, as shown below:

    \quotefromfile uitools/multipleinheritance/multipleinheritance.pro
    \skipto SOURCES
    \printuntil FORMS

    When the project is compiled, the \c uic will generate a corresponding
    \c ui_calculatorform.h.

    \section1 CalculatorForm Definition

    In the \c CalculatorForm definition, we include the \c ui_calculatorform.h
    that was generated earlier.

    \quotefromfile uitools/multipleinheritance/calculatorform.h
    \skipto #include
    \printuntil .h"

    As mentioned earlier, the class is a subclass of both QWidget and
    \c{Ui::CalculatorForm}.

    \skipto class CalculatorForm
    \printuntil };

    Two slots are defined according to the \l{Automatic Connections}
    {automatic connection} naming convention required by \c uic. This is
    to ensure that \l{QMetaObject}'s auto-connection facilities connect
    all the signals and slots involved automatically.

    \section1 CalculatorForm Implementation

    In the constructor, we call \c setupUi() to load the user interface file.
    Note that we do not need the \c{ui} prefix as \c CalculatorForm is a
    subclass of the user interface class.

    \quotefromfile uitools/multipleinheritance/calculatorform.cpp
    \skipto CalculatorForm::CalculatorForm
    \printuntil /^\}/

    We include two slots, \c{on_inputSpinBox1_valueChanged()} and
    \c{on_inputSpinBox2_valueChanged()}. These slots respond to the
    \l{QSpinBox::valueChanged()}{valueChanged()} signal that both spin boxes
    emit. Whenever there is a change in one spin box's value, we take that
    value and add it to whatever value the other spin box has.

    \skipto void CalculatorForm::on_inputSpinBox1
    \printuntil /^\}/

    \skipto void CalculatorForm::on_inputSpinBox2
    \printuntil /^\}/

    \section1 \c main() Function

    The \c main() function instantiates QApplication and \c CalculatorForm.
    The \c calculator object is displayed by invoking the \l{QWidget::show()}
    {show()} function.

    \quotefromfile uitools/multipleinheritance/main.cpp
    \skipto int main
    \printuntil /^\}/

    There are various approaches to include forms into applications. The
    Multiple Inheritance approach is just one of them. See
    \l{Using a Component in Your Application} for more information on the
    other approaches available.
*/