- Timestamp:
- Oct 16, 2020 11:02:57 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.cpp
r86584 r86603 20 20 #include <QDir> 21 21 #include <QFont> 22 #include <QHBoxLayout> 22 23 #ifdef RT_OS_LINUX 23 24 #include <QtHelp/QHelpEngine> 24 25 #include <QtHelp/QHelpContentWidget> 26 #include <QtHelp/QHelpIndexWidget> 25 27 #endif 26 28 #include <QMenu> 27 29 #include <QScrollBar> 28 30 #include <QStyle> 31 #include <QSplitter> 29 32 #include <QTextBrowser> 30 #include <QHBoxLayout>31 33 #ifdef RT_OS_SOLARIS 32 34 # include <QFontDatabase> … … 108 110 #endif 109 111 , m_pTextBrowser(0) 112 , m_pSplitter(0) 110 113 { 111 114 /* Prepare VM Log-Viewer: */ … … 150 153 /* Create main layout: */ 151 154 m_pMainLayout = new QHBoxLayout(this); 152 AssertReturnVoid(m_pMainLayout); 155 m_pSplitter = new QSplitter; 156 157 AssertReturnVoid(m_pMainLayout && m_pSplitter); 158 159 m_pMainLayout->addWidget(m_pSplitter); 153 160 #ifdef RT_OS_LINUX 154 161 m_pHelpEngine = new QHelpEngine(m_strHelpFilePath, this); … … 156 163 this, &UIHelpBrowserWidget::sltHandleHelpEngineSetupFinished); 157 164 158 // m_pTabWidget = new QITabWidget; 159 // m_pMainLayout->addWidget(m_pTabWidget); 165 m_pTabWidget = new QITabWidget; 166 AssertReturnVoid(m_pTabWidget); 167 m_pSplitter->addWidget(m_pTabWidget); 168 m_pTabWidget->addTab(m_pHelpEngine->contentWidget(), tr("Contents")); 169 m_pTabWidget->addTab(m_pHelpEngine->indexWidget(), tr("Index")); 170 160 171 m_pTextBrowser = new UIHelpBrowserViewer(m_pHelpEngine); 161 172 AssertReturnVoid(m_pTextBrowser); 162 m_pMainLayout->addWidget(m_pTextBrowser); 173 m_pSplitter->addWidget(m_pTextBrowser); 174 175 m_pSplitter->setStretchFactor(0, 1); 176 m_pSplitter->setStretchFactor(1, 4); 177 m_pSplitter->setChildrenCollapsible(false); 163 178 164 179 if (QFile(m_strHelpFilePath).exists() && m_pHelpEngine) 165 { 166 bool fSetupResult = m_pHelpEngine->setupData(); 167 //m_pHelpEngine->registerDocumentation(m_strHelpFilePath)); 168 printf("setup data %d %s\n", fSetupResult, qPrintable(m_strHelpFilePath)); 169 } 180 m_pHelpEngine->setupData(); 181 170 182 #endif 171 183 } … … 251 263 #ifdef RT_OS_LINUX 252 264 AssertReturnVoid(m_pTextBrowser && m_pHelpEngine); 253 254 265 QList<QUrl> files = m_pHelpEngine->files(m_pHelpEngine->namespaceName(m_strHelpFilePath), QStringList()); 255 266 if (!files.empty()) -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserWidget.h
r86583 r86603 45 45 class UIActionPool; 46 46 class UIDialogPanel; 47 class QSplitter; 47 48 48 49 /** QWidget extension providing GUI for VirtualBox LogViewer. It … … 130 131 #endif 131 132 UIHelpBrowserViewer *m_pTextBrowser; 133 QSplitter *m_pSplitter; 132 134 }; 133 135
Note:
See TracChangeset
for help on using the changeset viewer.