Changeset 68285 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 3, 2017 12:42:45 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 7 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2.qrc
r68235 r68285 300 300 <file alias="web_camera_unavailable_16px.png">images/web_camera_unavailable_16px.png</file> 301 301 <file alias="web_camera_unavailable_disabled_16px.png">images/web_camera_unavailable_disabled_16px.png</file> 302 <file alias="welcome .png">images/welcome.png</file>302 <file alias="welcome_200px.png">images/welcome_200px.png</file> 303 303 </qresource> 304 304 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/VirtualBox2_hidpi.qrc
r68235 r68285 294 294 <file alias="web_camera_unavailable_16px_hidpi.png">images/hidpi/web_camera_unavailable_16px_hidpi.png</file> 295 295 <file alias="web_camera_unavailable_disabled_16px_hidpi.png">images/hidpi/web_camera_unavailable_disabled_16px_hidpi.png</file> 296 <file alias="welcome_200px_hidpi.png">images/hidpi/welcome_200px_hidpi.png</file> 296 297 </qresource> 297 298 </RCC> -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r68282 r68285 272 272 updateActionsAppearance(); 273 273 274 /* Update Tools-pane: */ 275 m_pPaneToolsMachine->setCurrentItem(pItem); 276 274 277 /* If current item exists & accessible: */ 275 278 if (pItem && pItem->accessible()) … … 306 309 /* The VM is inaccessible: */ 307 310 m_pPaneToolsMachine->setDetailsError(UIMessageCenter::formatErrorInfo(pItem->accessError())); 308 }309 else310 {311 /* Default HTML support in Qt is terrible so just try to get something really simple: */312 m_pPaneToolsMachine->setDetailsText(313 tr("<h3>Welcome to VirtualBox!</h3>"314 "<p>The left part of this window is "315 "a list of all virtual machines on your computer. "316 "The list is empty now because you haven't created any virtual "317 "machines yet."318 "<img src=:/welcome.png align=right/></p>"319 "<p>In order to create a new virtual machine, press the "320 "<b>New</b> button in the main tool bar located "321 "at the top of the window.</p>"322 "<p>You can press the <b>%1</b> key to get instant help, "323 "or visit "324 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> "325 "for the latest information and news.</p>")326 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText)));327 311 } 328 312 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneGlobal.cpp
r68281 r68285 165 165 delete pWidget; 166 166 } 167 }168 169 void UIToolsPaneGlobal::setDetailsText(const QString &strText)170 {171 /* Update desktop pane: */172 AssertPtrReturnVoid(m_pPaneDesktop);173 m_pPaneDesktop->setToolsPaneText(strText);174 167 } 175 168 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneGlobal.h
r68235 r68285 71 71 void closeTool(ToolTypeGlobal enmType); 72 72 73 /** Defines @a strText and switches to text details pane. */74 void setDetailsText(const QString &strText);75 73 /** Defines @a strError and switches to error details pane. */ 76 74 void setDetailsError(const QString &strError); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneMachine.cpp
r68281 r68285 31 31 # include "UISnapshotPane.h" 32 32 # include "UIToolsPaneMachine.h" 33 # include "UIVMItem.h" 33 34 34 35 /* Other VBox includes: */ … … 41 42 : QIWithRetranslateUI<QWidget>(pParent) 42 43 , m_pActionPool(pActionPool) 44 , m_pItem(0) 43 45 , m_pLayout(0) 44 46 , m_pPaneDesktop(0) … … 171 173 } 172 174 173 void UIToolsPaneMachine::setDetailsText(const QString &strText)174 {175 /* Update desktop pane: */176 AssertPtrReturnVoid(m_pPaneDesktop);177 m_pPaneDesktop->setToolsPaneText(strText);178 }179 180 175 void UIToolsPaneMachine::setDetailsError(const QString &strError) 181 176 { … … 185 180 } 186 181 182 void UIToolsPaneMachine::setCurrentItem(UIVMItem *pItem) 183 { 184 /* Do we need translation after that? */ 185 const bool fTranslationRequired = !pItem && m_pItem 186 || pItem && !m_pItem; 187 188 /* Remember new item: */ 189 m_pItem = pItem; 190 191 /* Retranslate if necessary: */ 192 if (fTranslationRequired) 193 retranslateUi(); 194 } 195 187 196 void UIToolsPaneMachine::setItems(const QList<UIVMItem*> &items) 188 197 { … … 202 211 { 203 212 /* Translate Machine Tools welcome screen: */ 204 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_200px.png")); 205 m_pPaneDesktop->setToolsPaneText( 206 tr("<h3>Welcome to VirtualBox!</h3>" 207 "<p>The left part of this window is a list of all virtual " 208 "machines and virtual machine groups on your computer.</p>" 209 "<p>The right part of this window represents a set of " 210 "tools which are currently opened (or can be opened) for " 211 "the currently chosen machine. For list of currently " 212 "available tools check the corresponding menu at the right " 213 "side of the main tool bar located at the top of the window. " 214 "This list will be extended with new tools in the future releases.</p>" 215 "<p>You can press the <b>%1</b> key to get instant help, or visit " 216 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 217 "for the latest information and news.</p>") 218 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 213 if (!m_pItem || !m_pItem->accessible()) 214 { 215 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/welcome_200px.png")); 216 m_pPaneDesktop->setToolsPaneText( 217 tr("<h3>Welcome to VirtualBox!</h3>" 218 "<p>The left part of this window is a list of all virtual " 219 "machines and virtual machine groups on your computer. " 220 "The list is empty now because you haven't created any " 221 "virtual machines yet.</p>" 222 "<p>In order to create a new virtual machine, press the " 223 "<b>New</b> button in the main tool bar located at the " 224 "top of the window.</p>" 225 "<p>You can press the <b>%1</b> key to get instant help, or visit " 226 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 227 "for the latest information and news.</p>") 228 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 229 } 230 else 231 { 232 m_pPaneDesktop->setToolsPaneIcon(UIIconPool::iconSet(":/tools_200px.png")); 233 m_pPaneDesktop->setToolsPaneText( 234 tr("<h3>Welcome to VirtualBox!</h3>" 235 "<p>The left part of this window is a list of all virtual " 236 "machines and virtual machine groups on your computer.</p>" 237 "<p>The right part of this window represents a set of " 238 "tools which are currently opened (or can be opened) for " 239 "the currently chosen machine. For list of currently " 240 "available tools check the corresponding menu at the right " 241 "side of the main tool bar located at the top of the window. " 242 "This list will be extended with new tools in the future releases.</p>" 243 "<p>You can press the <b>%1</b> key to get instant help, or visit " 244 "<a href=https://www.virtualbox.org>www.virtualbox.org</a> " 245 "for the latest information and news.</p>") 246 .arg(QKeySequence(QKeySequence::HelpContents).toString(QKeySequence::NativeText))); 247 } 219 248 220 249 /* Wipe out the tool descriptions: */ … … 222 251 223 252 /* Add tool descriptions: */ 224 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_Details); 225 m_pPaneDesktop->addToolDescription(pAction1, 226 tr("Tool to observe virtual machine (VM) details. " 227 "Reflects groups of <u>properties</u> for the currently chosen VM and allows " 228 "for basic manipulations on few of them (like the machine storage devices).")); 229 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_Snapshots); 230 m_pPaneDesktop->addToolDescription(pAction2, 231 tr("Tool to control virtual machine (VM) snapshots. " 232 "Reflects <u>snapshots</u> created for the currently chosen VM and allows " 233 "for snapshot manipulations like possibility to <u>create</u>, <u>remove</u>, " 234 "<u>restore</u> (make current) and observe their properties. Allows to " 235 "<u>edit</u> snapshot attributes like <u>name</u> and <u>description</u>.")); 253 if (m_pItem && m_pItem->accessible()) 254 { 255 QAction *pAction1 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_Details); 256 m_pPaneDesktop->addToolDescription(pAction1, 257 tr("Tool to observe virtual machine (VM) details. " 258 "Reflects groups of <u>properties</u> for the currently chosen VM and allows " 259 "for basic manipulations on few of them (like the machine storage devices).")); 260 QAction *pAction2 = m_pActionPool->action(UIActionIndexST_M_Tools_M_Machine_Snapshots); 261 m_pPaneDesktop->addToolDescription(pAction2, 262 tr("Tool to control virtual machine (VM) snapshots. " 263 "Reflects <u>snapshots</u> created for the currently chosen VM and allows " 264 "for snapshot manipulations like possibility to <u>create</u>, <u>remove</u>, " 265 "<u>restore</u> (make current) and observe their properties. Allows to " 266 "<u>edit</u> snapshot attributes like <u>name</u> and <u>description</u>.")); 267 } 236 268 } 237 269 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIToolsPaneMachine.h
r68235 r68285 82 82 void closeTool(ToolTypeMachine enmType); 83 83 84 /** Defines @a strText and switches to text details pane. */85 void setDetailsText(const QString &strText);86 84 /** Defines @a strError and switches to error details pane. */ 87 85 void setDetailsError(const QString &strError); 86 87 /** Defines current machine @a pItem. */ 88 void setCurrentItem(UIVMItem *pItem); 88 89 89 90 /** Defines the machine @a items. */ … … 110 111 UIActionPool *m_pActionPool; 111 112 113 /** Holds current machine item reference. */ 114 UIVMItem *m_pItem; 115 112 116 /** Holds the stacked-layout instance. */ 113 117 QStackedLayout *m_pLayout;
Note:
See TracChangeset
for help on using the changeset viewer.