本文整理汇总了C++中TabWidget::setHints方法的典型用法代码示例。如果您正苦于以下问题:C++ TabWidget::setHints方法的具体用法?C++ TabWidget::setHints怎么用?C++ TabWidget::setHints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TabWidget
的用法示例。
在下文中一共展示了TabWidget::setHints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ButtonWidget
GlobalOptionsDialog::GlobalOptionsDialog()
: OptionsDialog(Common::ConfigManager::kApplicationDomain, "globaloptions") {
// The tab widget
TabWidget *tab = new TabWidget(this, "globaloptions_tabwidget");
tab->setHints(THEME_HINT_FIRST_DRAW | THEME_HINT_SAVE_BACKGROUND);
//
// 1) The graphics tab
//
tab->addTab("Graphics");
addGraphicControls(tab, "globaloptions_");
//
// 2) The audio tab
//
tab->addTab("Audio");
addAudioControls(tab, "globaloptions_");
int volControlPos = g_gui.evaluator()->getVar("volumeControlsInAudio", true);
if (volControlPos)
addVolumeControls(tab, "globaloptions_");
addSubtitleControls(tab, "globaloptions_");
if (!volControlPos) {
tab->addTab("Volume");
addVolumeControls(tab, "globaloptions_");
}
// TODO: cd drive setting
//
// 3) The MIDI tab
//
tab->addTab("MIDI");
addMIDIControls(tab, "globaloptions_");
//
// 4) The miscellaneous tab
//
tab->addTab("Paths");
#if !( defined(__DC__) || defined(__GP32__) )
// These two buttons have to be extra wide, or the text will be
// truncated in the small version of the GUI.
// Save game path
new ButtonWidget(tab, "globaloptions_savebutton", "Save Path: ", kChooseSaveDirCmd, 0);
_savePath = new StaticTextWidget(tab, "globaloptions_savepath", "/foo/bar");
new ButtonWidget(tab, "globaloptions_themebutton", "Theme Path:", kChooseThemeDirCmd, 0);
_themePath = new StaticTextWidget(tab, "globaloptions_themepath", "None");
new ButtonWidget(tab, "globaloptions_extrabutton", "Extra Path:", kChooseExtraDirCmd, 0);
_extraPath = new StaticTextWidget(tab, "globaloptions_extrapath", "None");
#endif
#ifdef SMALL_SCREEN_DEVICE
new ButtonWidget(tab, "globaloptions_keysbutton", "Keys", kChooseKeyMappingCmd, 0);
#endif
// TODO: joystick setting
// Activate the first tab
tab->setActiveTab(0);
// Add OK & Cancel buttons
new ButtonWidget(this, "globaloptions_cancel", "Cancel", kCloseCmd, 0);
new ButtonWidget(this, "globaloptions_ok", "OK", kOKCmd, 0);
#ifdef SMALL_SCREEN_DEVICE
_keysDialog = new KeysDialog();
#endif
}