MCPcopy Create free account
hub / github.com/TASEmulators/fceux / HelpDialog

Method HelpDialog

src/drivers/Qt/HelpPages.cpp:242–347  ·  view source on GitHub ↗

----------------------------------------------------------------------------------------------- --- Help Page Dialog -----------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

240//--- Help Page Dialog
241//-----------------------------------------------------------------------------------------------
242HelpDialog::HelpDialog( const char *helpFileName, QWidget *parent)
243 : QDialog(parent, Qt::Window)
244{
245 int useNativeMenuBar;
246 QMenu *fileMenu;
247 QMenuBar *menuBar;
248 QToolBar *toolBar;
249 QAction *act;
250 QVBoxLayout *mainLayoutv;
251 QSettings settings;
252
253 mainLayoutv = new QVBoxLayout();
254
255 setLayout( mainLayoutv );
256
257 toolBar = new QToolBar(this);
258 menuBar = new QMenuBar(this);
259 mainLayoutv->setMenuBar( menuBar );
260
261 // This is needed for menu bar to show up on MacOS
262 g_config->getOption( "SDL.UseNativeMenuBar", &useNativeMenuBar );
263
264 menuBar->setNativeMenuBar( useNativeMenuBar ? true : false );
265
266 helpEngine = new QHelpEngine( helpFileName, this );
267 helpEngine->setupData();
268
269 hsplitter = new QSplitter( Qt::Horizontal );
270 tabWgt = new QTabWidget();
271 textViewer = new HelpBrowser( helpEngine );
272
273 textViewer->setSource(
274 QUrl("qthelp://TasVideos.fceux/doc/help/fceux.html"));
275
276 //-----------------------------------------------------------------------
277 // Menu Start
278 //-----------------------------------------------------------------------
279 // File
280 fileMenu = menuBar->addMenu(tr("&File"));
281
282 // File -> Close
283 act = new QAction(tr("&Close"), this);
284 act->setShortcut(QKeySequence::Close);
285 act->setStatusTip(tr("Close Window"));
286 connect(act, SIGNAL(triggered()), this, SLOT(closeWindow(void)) );
287
288 fileMenu->addAction(act);
289
290 //-----------------------------------------------------------------------
291 // Menu End
292 //-----------------------------------------------------------------------
293
294 //-----------------------------------------------------------------------
295 // Tool Bar Setup Start
296 //-----------------------------------------------------------------------
297
298 backButton = act = new QAction(tr("&Backward"), this);
299 act->setShortcut( QKeySequence(tr("Alt+Left") ));

Callers

nothing calls this directly

Calls 4

getOptionMethod · 0.80
setSourceMethod · 0.80
valueMethod · 0.80
trFunction · 0.50

Tested by

no test coverage detected