本文整理汇总了C++中Global::setNewNoteFocusToTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Global::setNewNoteFocusToTitle方法的具体用法?C++ Global::setNewNoteFocusToTitle怎么用?C++ Global::setNewNoteFocusToTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Global
的用法示例。
在下文中一共展示了Global::setNewNoteFocusToTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveValues
void AppearancePreferences::saveValues() {
int index = systemNotifier->currentIndex();
QString sysnotifier = systemNotifier->itemData(index, Qt::UserRole).toString();
global.setNewNoteFocusToTitle(newNoteFocusOnTitle->isChecked());
global.setDeleteConfirmation(this->confirmDeletes->isChecked());
global.settings->beginGroup("Appearance");
global.settings->setValue("disableEditingOnStartup", disableEditingOnStartup->isChecked());
global.settings->setValue("forceWebFonts", forceWebFonts->isChecked());
global.settings->setValue("showTrayIcon", showTrayIcon->isChecked());
global.settings->setValue("showPDFs", showPDFs->isChecked());
global.autoHideEditorToolbar = this->autoHideEditorButtonbar->isChecked();
global.settings->setValue("autoHideEditorToolbar", global.autoHideEditorToolbar);
global.settings->setValue("mouseMiddleClickOpen", mouseMiddleClickAction->currentIndex());
global.settings->setValue("traySingleClickAction", traySingleClickAction->currentIndex());
global.settings->setValue("trayMiddleClickAction", trayMiddleClickAction->currentIndex());
global.settings->setValue("systemNotifier", sysnotifier);
global.settings->remove("trayDoubleClickAction");
global.pdfPreview = showPDFs->isChecked();
if (minimizeToTray!= NULL)
global.settings->setValue("minimizeToTray", minimizeToTray->isChecked());
else
global.settings->remove("minimizeToTray");
if (closeToTray != NULL)
global.settings->setValue("closeToTray", closeToTray->isChecked());
else
global.settings->remove("closeToTray");
global.settings->setValue("showSplashScreen", showSplashScreen->isChecked());
global.settings->setValue("startMinimized", startMinimized->isChecked());
global.settings->setValue("showMissedReminders", showMissedReminders->isChecked());
if (dynamicTotals->isChecked()) {
global.settings->setValue("countBehavior", 1);
global.countBehavior = Global::CountAll;
} else {
global.settings->setValue("countBehavior", 2);
global.countBehavior = Global::CountNone;
}
index = defaultNotebookOnStartup->currentIndex();
int value = defaultNotebookOnStartup->itemData(index).toInt();
global.settings->setValue("startupNotebook", value);
// Save default font & size
if (webSettingsChanged) {
int idx = defaultFontChooser->currentIndex();
global.defaultFont = defaultFontChooser->itemData(idx, Qt::UserRole).toString();
idx = defaultFontSizeChooser->currentIndex();
global.defaultFontSize = defaultFontSizeChooser->itemData(idx, Qt::UserRole).toInt();
idx = defaultGuiFontSizeChooser->currentIndex();
global.defaultGuiFontSize = defaultGuiFontSizeChooser->itemData(idx, Qt::UserRole).toInt();
idx = defaultGuiFontChooser->currentIndex();
global.defaultGuiFont = defaultGuiFontChooser->itemData(idx, Qt::UserRole).toString();
if (global.defaultGuiFont == "System Default")
global.defaultGuiFont = "";
if (global.defaultFont == "System Default")
global.defaultFont = "";
global.settings->setValue("defaultFont", global.defaultFont);
global.settings->setValue("defaultFontSize", global.defaultFontSize);
global.settings->setValue("defaultGuiFont", global.defaultGuiFont);
global.settings->setValue("defaultGuiFontSize", global.defaultGuiFontSize);
QWebSettings *settings = QWebSettings::globalSettings();
settings->setFontFamily(QWebSettings::StandardFont, global.defaultFont);
// QWebkit DPI is hard coded to 96. Hence, we calculate the correct
// font size based on desktop logical DPI.
if (global.defaultFontSize > 0) {
settings->setFontSize(QWebSettings::DefaultFontSize, global.defaultFontSize * (QApplication::desktop()->logicalDpiX() / 96.0));
}
}
// See if the user has overridden the window icon
// index = windowThemeChooser->currentIndex();
// QString userIcon = windowThemeChooser->itemData(index).toString();
// if (userIcon != global.getResourceFileName(userIcon)) {
//global.settings->setValue("windowIcon", userIcon);
//Copy the nixnote2.desktop so we can override the app icon
// Ideally, we could use QSettings since it is ini format, but
// it puts [Desktop Entry] as [Desktop%20Enry], which screws
// things up.
QString systemFile = "/usr/share/applications/nixnote2.desktop";
QFile systemIni(systemFile);
QStringList desktopData;
if (systemIni.open(QIODevice::ReadOnly)) {
QTextStream data(&systemIni);
QString line = data.readLine();
while (!line.isNull()) {
if (line.startsWith("Icon=")) {
line = "Icon=" +global.getResourceFileName(global.resourceList,":windowIcon.png");
}
desktopData.append(line);
line = data.readLine();
}
}
systemIni.close();
// Now, write it back out
QString userFile = QDir::homePath()+"/.local/share/applications/nixnote2.desktop";
QFile userIni(userFile);
//.........这里部分代码省略.........