VirtualBox

Changeset 44304 in vbox


Ignore:
Timestamp:
Jan 16, 2013 11:54:25 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6569: Make sure all the NLS strings related to VM selector are updated after the language switch.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp

    r44016 r44304  
    149149    : UIGDetailsElementInterface(pParent, DetailsElementType_General, fOpened)
    150150{
    151     /* Name/icon: */
     151    /* Icon: */
     152    setIcon(UIIconPool::iconSet(":/machine_16px.png"));
     153
     154    /* Translate: */
     155    retranslateUi();
     156}
     157
     158void UIGDetailsElementGeneral::retranslateUi()
     159{
    152160    setName(gpConverter->toString(DetailsElementType_General));
    153     setIcon(UIIconPool::iconSet(":/machine_16px.png"));
    154161}
    155162
     
    163170    : UIGDetailsElement(pParent, DetailsElementType_Preview, fOpened)
    164171{
    165     /* Name/icon: */
    166     setName(gpConverter->toString(DetailsElementType_Preview));
     172    /* Icon: */
    167173    setIcon(UIIconPool::iconSet(":/machine_16px.png"));
    168174
     
    178184    pLayout->addItem(m_pPreview);
    179185    setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
     186
     187    /* Translate: */
     188    retranslateUi();
     189}
     190
     191void UIGDetailsElementPreview::retranslateUi()
     192{
     193    setName(gpConverter->toString(DetailsElementType_Preview));
    180194}
    181195
     
    227241    /* Return result: */
    228242    return iProposedHeight;
    229 }
    230 
    231 void UIGDetailsElementPreview::updateAppearance()
    232 {
    233     m_pPreview->setMachine(machine());
    234     emit sigBuildDone();
    235243}
    236244
     
    245253    if (opened() && !m_pPreview->isVisible() && !isAnimationRunning())
    246254        m_pPreview->show();
     255}
     256
     257void UIGDetailsElementPreview::updateAppearance()
     258{
     259    m_pPreview->setMachine(machine());
     260    emit sigBuildDone();
    247261}
    248262
     
    327341    : UIGDetailsElementInterface(pParent, DetailsElementType_System, fOpened)
    328342{
    329     /* Name/icon: */
     343    /* Icon: */
     344    setIcon(UIIconPool::iconSet(":/chipset_16px.png"));
     345
     346    /* Translate: */
     347    retranslateUi();
     348}
     349
     350void UIGDetailsElementSystem::retranslateUi()
     351{
    330352    setName(gpConverter->toString(DetailsElementType_System));
    331     setIcon(UIIconPool::iconSet(":/chipset_16px.png"));
    332353}
    333354
     
    403424    : UIGDetailsElementInterface(pParent, DetailsElementType_Display, fOpened)
    404425{
    405     /* Name/icon: */
     426    /* Icon: */
     427    setIcon(UIIconPool::iconSet(":/vrdp_16px.png"));
     428
     429    /* Translate: */
     430    retranslateUi();
     431}
     432
     433void UIGDetailsElementDisplay::retranslateUi()
     434{
    406435    setName(gpConverter->toString(DetailsElementType_Display));
    407     setIcon(UIIconPool::iconSet(":/vrdp_16px.png"));
    408436}
    409437
     
    484512    : UIGDetailsElementInterface(pParent, DetailsElementType_Storage, fOpened)
    485513{
    486     /* Name/icon: */
     514    /* Icon: */
     515    setIcon(UIIconPool::iconSet(":/attachment_16px.png"));
     516
     517    /* Translate: */
     518    retranslateUi();
     519}
     520
     521void UIGDetailsElementStorage::retranslateUi()
     522{
    487523    setName(gpConverter->toString(DetailsElementType_Storage));
    488     setIcon(UIIconPool::iconSet(":/attachment_16px.png"));
    489524}
    490525
     
    541576    : UIGDetailsElementInterface(pParent, DetailsElementType_Audio, fOpened)
    542577{
    543     /* Name/icon: */
     578    /* Icon: */
     579    setIcon(UIIconPool::iconSet(":/sound_16px.png"));
     580
     581    /* Translate: */
     582    retranslateUi();
     583}
     584
     585void UIGDetailsElementAudio::retranslateUi()
     586{
    544587    setName(gpConverter->toString(DetailsElementType_Audio));
    545     setIcon(UIIconPool::iconSet(":/sound_16px.png"));
    546588}
    547589
     
    651693    : UIGDetailsElementInterface(pParent, DetailsElementType_Network, fOpened)
    652694{
    653     /* Name/icon: */
     695    /* Icon: */
     696    setIcon(UIIconPool::iconSet(":/nw_16px.png"));
     697
     698    /* Translate: */
     699    retranslateUi();
     700}
     701
     702void UIGDetailsElementNetwork::retranslateUi()
     703{
    654704    setName(gpConverter->toString(DetailsElementType_Network));
    655     setIcon(UIIconPool::iconSet(":/nw_16px.png"));
    656705}
    657706
     
    713762    : UIGDetailsElementInterface(pParent, DetailsElementType_Serial, fOpened)
    714763{
    715     /* Name/icon: */
     764    /* Icon: */
     765    setIcon(UIIconPool::iconSet(":/serial_port_16px.png"));
     766
     767    /* Translate: */
     768    retranslateUi();
     769}
     770
     771void UIGDetailsElementSerial::retranslateUi()
     772{
    716773    setName(gpConverter->toString(DetailsElementType_Serial));
    717     setIcon(UIIconPool::iconSet(":/serial_port_16px.png"));
    718774}
    719775
     
    771827    : UIGDetailsElementInterface(pParent, DetailsElementType_Parallel, fOpened)
    772828{
    773     /* Name/icon: */
     829    /* Icon: */
     830    setIcon(UIIconPool::iconSet(":/parallel_port_16px.png"));
     831
     832    /* Translate: */
     833    retranslateUi();
     834}
     835
     836void UIGDetailsElementParallel::retranslateUi()
     837{
    774838    setName(gpConverter->toString(DetailsElementType_Parallel));
    775     setIcon(UIIconPool::iconSet(":/parallel_port_16px.png"));
    776839}
    777840
     
    833896    : UIGDetailsElementInterface(pParent, DetailsElementType_USB, fOpened)
    834897{
    835     /* Name/icon: */
     898    /* Icon: */
     899    setIcon(UIIconPool::iconSet(":/usb_16px.png"));
     900
     901    /* Translate: */
     902    retranslateUi();
     903}
     904
     905void UIGDetailsElementUSB::retranslateUi()
     906{
    836907    setName(gpConverter->toString(DetailsElementType_USB));
    837     setIcon(UIIconPool::iconSet(":/usb_16px.png"));
    838908}
    839909
     
    881951    : UIGDetailsElementInterface(pParent, DetailsElementType_SF, fOpened)
    882952{
    883     /* Name/icon: */
     953    /* Icon: */
     954    setIcon(UIIconPool::iconSet(":/shared_folder_16px.png"));
     955
     956    /* Translate: */
     957    retranslateUi();
     958}
     959
     960void UIGDetailsElementSF::retranslateUi()
     961{
    884962    setName(gpConverter->toString(DetailsElementType_SF));
    885     setIcon(UIIconPool::iconSet(":/shared_folder_16px.png"));
    886963}
    887964
     
    9291006    : UIGDetailsElementInterface(pParent, DetailsElementType_Description, fOpened)
    9301007{
    931     /* Name/icon: */
     1008    /* Icon: */
     1009    setIcon(UIIconPool::iconSet(":/description_16px.png"));
     1010
     1011    /* Translate: */
     1012    retranslateUi();
     1013}
     1014
     1015void UIGDetailsElementDescription::retranslateUi()
     1016{
    9321017    setName(gpConverter->toString(DetailsElementType_Description));
    933     setIcon(UIIconPool::iconSet(":/description_16px.png"));
    9341018}
    9351019
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.h

    r43982 r44304  
    119119private:
    120120
    121     /* Helpers: Update stuff: */
     121    /* Helper: Translate stuff: */
     122    void retranslateUi();
     123
     124    /* Helper: Update stuff: */
    122125    UIGDetailsUpdateThread* createUpdateThread();
    123126};
     
    135138
    136139private:
     140
     141    /* Helper: Translate stuff: */
     142    void retranslateUi();
    137143
    138144    /* Helpers: Layout stuff: */
    139145    int minimumWidthHint() const;
    140146    int minimumHeightHint(bool fClosed) const;
    141 
    142     /* Helpers: Update stuff: */
     147    void updateLayout();
     148
     149    /* Helper: Update stuff: */
    143150    void updateAppearance();
    144 
    145     /* Helpers: Layout stuff: */
    146     void updateLayout();
    147151
    148152    /* Variables: */
     
    179183private:
    180184
    181     /* Helpers: Update stuff: */
     185    /* Helper: Translate stuff: */
     186    void retranslateUi();
     187
     188    /* Helper: Update stuff: */
    182189    UIGDetailsUpdateThread* createUpdateThread();
    183190};
     
    212219private:
    213220
    214     /* Helpers: Update stuff: */
     221    /* Helper: Translate stuff: */
     222    void retranslateUi();
     223
     224    /* Helper: Update stuff: */
    215225    UIGDetailsUpdateThread* createUpdateThread();
    216226};
     
    245255private:
    246256
    247     /* Helpers: Update stuff: */
     257    /* Helper: Translate stuff: */
     258    void retranslateUi();
     259
     260    /* Helper: Update stuff: */
    248261    UIGDetailsUpdateThread* createUpdateThread();
    249262};
     
    278291private:
    279292
    280     /* Helpers: Update stuff: */
     293    /* Helper: Translate stuff: */
     294    void retranslateUi();
     295
     296    /* Helper: Update stuff: */
    281297    UIGDetailsUpdateThread* createUpdateThread();
    282298};
     
    312328private:
    313329
    314     /* Helpers: Update stuff: */
     330    /* Helper: Translate stuff: */
     331    void retranslateUi();
     332
     333    /* Helper: Update stuff: */
    315334    UIGDetailsUpdateThread* createUpdateThread();
    316335};
     
    345364private:
    346365
    347     /* Helpers: Update stuff: */
     366    /* Helper: Translate stuff: */
     367    void retranslateUi();
     368
     369    /* Helper: Update stuff: */
    348370    UIGDetailsUpdateThread* createUpdateThread();
    349371};
     
    379401private:
    380402
    381     /* Helpers: Update stuff: */
     403    /* Helper: Translate stuff: */
     404    void retranslateUi();
     405
     406    /* Helper: Update stuff: */
    382407    UIGDetailsUpdateThread* createUpdateThread();
    383408};
     
    413438private:
    414439
    415     /* Helpers: Update stuff: */
     440    /* Helper: Translate stuff: */
     441    void retranslateUi();
     442
     443    /* Helper: Update stuff: */
    416444    UIGDetailsUpdateThread* createUpdateThread();
    417445};
     
    446474private:
    447475
    448     /* Helpers: Update stuff: */
     476    /* Helper: Translate stuff: */
     477    void retranslateUi();
     478
     479    /* Helper: Update stuff: */
    449480    UIGDetailsUpdateThread* createUpdateThread();
    450481};
     
    479510private:
    480511
    481     /* Helpers: Update stuff: */
     512    /* Helper: Translate stuff: */
     513    void retranslateUi();
     514
     515    /* Helper: Update stuff: */
    482516    UIGDetailsUpdateThread* createUpdateThread();
    483517};
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.cpp

    r44064 r44304  
    3131
    3232UIGDetailsItem::UIGDetailsItem(UIGDetailsItem *pParent)
    33     : QIGraphicsWidget(pParent)
     33    : QIWithRetranslateUI4<QIGraphicsWidget>(pParent)
    3434    , m_pParent(pParent)
    3535{
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsItem.h

    r44064 r44304  
    2222/* GUI includes: */
    2323#include "QIGraphicsWidget.h"
     24#include "QIWithRetranslateUI.h"
    2425
    2526/* Forward declaration: */
     
    4344/* Details item interface
    4445 * for graphics details model/view architecture: */
    45 class UIGDetailsItem : public QIGraphicsWidget
     46class UIGDetailsItem : public QIWithRetranslateUI4<QIGraphicsWidget>
    4647{
    4748    Q_OBJECT;
     
    9091protected:
    9192
     93    /* Helper: Translate stuff: */
     94    void retranslateUi() {}
     95
    9296    /* Helpers: Paint stuff: */
    9397    static void configurePainterShape(QPainter *pPainter, const QStyleOptionGraphicsItem *pOption, int iRadius);
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp

    r42686 r44304  
    4848
    4949UIGMachinePreview::UIGMachinePreview(QIGraphicsWidget *pParent)
    50     : QIGraphicsWidget(pParent)
     50    : QIWithRetranslateUI4<QIGraphicsWidget>(pParent)
    5151    , m_machineState(KMachineState_Null)
    5252    , m_pUpdateTimer(new QTimer(this))
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h

    r42529 r44304  
    2525/* GUI includes: */
    2626#include "UIGDetailsItem.h"
     27#include "QIWithRetranslateUI.h"
    2728
    2829/* COM includes: */
     
    5152
    5253/* Preview window class: */
    53 class UIGMachinePreview : public QIGraphicsWidget
     54class UIGMachinePreview : public QIWithRetranslateUI4<QIGraphicsWidget>
    5455{
    5556    Q_OBJECT;
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