⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 desktopclockpreferences.ui.h

📁 Linux/windows环境下Qt程序
💻 H
字号:
#include "BSettings.h"#include <qcolordialog.h>#include <qfontdialog.h>#include <qlabel.h>void DesktopClockPreferences::setSettings( void * s){	BSettings * settings = (BSettings*)s;	showWMCheckBox->setChecked(settings->showWM);   	showAHCheckBox->setChecked(settings->showAH);	stayOnTopCheckBox->setChecked(settings->stayOnTop);	showDateCheckBox->setChecked(settings->showDate);	showTimeCheckBox->setChecked(settings->showTime);	showSecondsCheckBox->setChecked(settings->showSeconds);	showGlareCheckBox->setChecked(settings->showGlare);	dateStringFormat->setText(settings->dateFormat);	timeStringFormat->setText(settings->timeFormat);	fontLabel->setText(settings->fontFormat);	hourColorLabel->setPaletteBackgroundColor(QColor(settings->hourColor));	secondColorLabel->setPaletteBackgroundColor(QColor(settings->secondColor));}void DesktopClockPreferences::getSettings( void* s){	BSettings * settings = (BSettings*)s;	settings->showWM = showWMCheckBox->isChecked();	settings->showAH = showAHCheckBox->isChecked();	settings->stayOnTop = stayOnTopCheckBox->isChecked();	settings->showDate = showDateCheckBox->isChecked();	settings->showTime = showTimeCheckBox->isChecked();	settings->showSeconds = showSecondsCheckBox->isChecked();	settings->showGlare = showGlareCheckBox->isChecked();	settings->dateFormat = dateStringFormat->text();	settings->timeFormat = timeStringFormat->text();	settings->fontFormat = fontLabel->text();	settings->hourColor = hourColorLabel->paletteBackgroundColor().name();	settings->secondColor = secondColorLabel->paletteBackgroundColor().name();}void DesktopClockPreferences::selectHourColor(){	hourColorLabel->setPaletteBackgroundColor(QColorDialog::getColor(hourColorLabel->paletteBackgroundColor()));}void DesktopClockPreferences::selectSecondColor(){	secondColorLabel->setPaletteBackgroundColor(QColorDialog::getColor(secondColorLabel->paletteBackgroundColor()));}void DesktopClockPreferences::selectFont(){    bool ok;    QFont fnt = QFontDialog::getFont(&ok, font(), this);    if (ok)	    fontLabel->setText(fnt.toString());    else	    return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -