VirtualBox

Changeset 3445 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 5, 2007 10:56:54 AM (18 years ago)
Author:
vboxsync
Message:

2015: Make all help buttons work:

All HELP buttons are connected to VBoxGlobal::showHelpDialog() slot.
This slot currently opens the VirtualBox manual.
Context sensitive help will be provided later.

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h

    r3144 r3445  
    435435    static QString removeAccelMark (const QString &aText);
    436436
     437public slots:
     438
     439    void showHelpDialog();
     440
    437441signals:
    438442
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r3275 r3445  
    29412941}
    29422942
    2943 /** 
     2943/**
    29442944 *  Removes the acceletartor mark (the ampersand symbol) from the given string
    29452945 *  and returns the result. The string is supposed to be a menu item's text
     
    29542954 *  @note This function removes only the first occurense of the accelerator
    29552955 *  mark.
    2956  * 
     2956 *
    29572957 *  @param aText Menu item's text to remove the acceletaror mark from.
    2958  * 
     2958 *
    29592959 *  @return The resulting string.
    29602960 */
     
    29762976
    29772977    return result;
     2978}
     2979
     2980void VBoxGlobal::showHelpDialog()
     2981{
     2982#ifndef VBOX_OSE
     2983#if defined (Q_WS_WIN32)
     2984    QString fullHelpFilePath = qApp->applicationDirPath() + "/VirtualBox.chm";
     2985
     2986    HtmlHelp (GetDesktopWindow(), fullHelpFilePath.ucs2(),
     2987              HH_DISPLAY_TOPIC, NULL);
     2988#elif defined (Q_WS_X11)
     2989    QString fullProgPath = qApp->applicationDirPath();
     2990    QProcess kchmViewer (fullProgPath + "/kchmviewer");
     2991    kchmViewer.addArgument (fullProgPath + "/VirtualBox.chm");
     2992    kchmViewer.launch ("");
     2993#elif defined (Q_WS_MAC)
     2994    QProcess openApp (QString("/usr/bin/open"));
     2995    openApp.addArgument (qApp->applicationDirPath() + "/UserManual.pdf");
     2996    openApp.launch ("");
     2997#endif
     2998#endif /* VBOX_OSE */
    29782999}
    29793000
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r3061 r3445  
    951951void VBoxSelectorWnd::showHelpContents()
    952952{
    953 #ifndef VBOX_OSE
    954 #if defined (Q_WS_WIN32)
    955     QString fullHelpFilePath = qApp->applicationDirPath() + "/VirtualBox.chm";
    956 
    957     HtmlHelp (GetDesktopWindow(), fullHelpFilePath.ucs2(),
    958               HH_DISPLAY_TOPIC, NULL);
    959 #elif defined (Q_WS_X11)
    960     QString fullProgPath = qApp->applicationDirPath();
    961     QProcess kchmViewer (fullProgPath + "/kchmviewer");
    962     kchmViewer.addArgument (fullProgPath + "/VirtualBox.chm");
    963     kchmViewer.launch ("");
    964 #elif defined (Q_WS_MAC)
    965     QProcess openApp (QString("/usr/bin/open"));
    966     openApp.addArgument (qApp->applicationDirPath() + "/UserManual.pdf");
    967     openApp.launch ("");
    968 #endif
    969 #endif /* VBOX_OSE */
     953    vboxGlobal().showHelpDialog();
    970954}
    971955
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxCloseVMDlg.ui

    r2988 r3445  
    288288        <slot>setEnabled(bool)</slot>
    289289    </connection>
     290    <connection>
     291        <sender>buttonHelp</sender>
     292        <signal>clicked()</signal>
     293        <receiver>&amp;vboxGlobal()</receiver>
     294        <slot>showHelpDialog()</slot>
     295    </connection>
    290296</connections>
     297<includes>
     298    <include location="local" impldecl="in implementation">VBoxGlobal.h</include>
     299</includes>
    291300<pixmapinproject/>
    292301<layoutdefaults spacing="6" margin="11"/>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxDiskImageManagerDlg.ui

    r2988 r3445  
    495495        <receiver>VBoxDiskImageManagerDlg</receiver>
    496496        <slot>processCurrentChanged()</slot>
     497    </connection>
     498    <connection>
     499        <sender>buttonHelp</sender>
     500        <signal>clicked()</signal>
     501        <receiver>&amp;vboxGlobal()</receiver>
     502        <slot>showHelpDialog()</slot>
    497503    </connection>
    498504</connections>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxGlobalSettingsDlg.ui

    r3183 r3445  
    12711271        <receiver>VBoxGlobalSettingsDlg</receiver>
    12721272        <slot>lvLanguages_currentChanged(QListViewItem*)</slot>
     1273    </connection>
     1274    <connection>
     1275        <sender>buttonHelp</sender>
     1276        <signal>clicked()</signal>
     1277        <receiver>&amp;vboxGlobal()</receiver>
     1278        <slot>showHelpDialog()</slot>
    12731279    </connection>
    12741280</connections>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxSnapshotDetailsDlg.ui

    r2988 r3445  
    273273        <slot>leName_textChanged(const QString&amp;)</slot>
    274274    </connection>
     275    <connection>
     276        <sender>buttonHelp</sender>
     277        <signal>clicked()</signal>
     278        <receiver>&amp;vboxGlobal()</receiver>
     279        <slot>showHelpDialog()</slot>
     280    </connection>
    275281</connections>
    276282<tabstops>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxTakeSnapshotDlg.ui

    r2988 r3445  
    288288        <slot>leName_textChanged(const QString&amp;)</slot>
    289289    </connection>
     290    <connection>
     291        <sender>buttonHelp</sender>
     292        <signal>clicked()</signal>
     293        <receiver>&amp;vboxGlobal()</receiver>
     294        <slot>showHelpDialog()</slot>
     295    </connection>
    290296</connections>
    291297<tabstops>
     
    296302    <include location="global" impldecl="in declaration">qlabel.h</include>
    297303    <include location="global" impldecl="in declaration">qlineedit.h</include>
     304    <include location="local" impldecl="in implementation">VBoxGlobal.h</include>
    298305    <include location="local" impldecl="in implementation">VBoxUtils.h</include>
    299306    <include location="local" impldecl="in implementation">VBoxTakeSnapshotDlg.ui.h</include>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui

    r3349 r3445  
    28912891        <receiver>VBoxVMSettingsDlg</receiver>
    28922892        <slot>hostInterfaceRemove()</slot>
     2893    </connection>
     2894    <connection>
     2895        <sender>buttonHelp</sender>
     2896        <signal>clicked()</signal>
     2897        <receiver>&amp;vboxGlobal()</receiver>
     2898        <slot>showHelpDialog()</slot>
    28932899    </connection>
    28942900</connections>
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette