void TimeScale::setAbsoluteTimeEnabled(bool absoluteTime, bool absoluteDate) { absoluteDate = absoluteTime && absoluteDate; if ( _showAbsoluteValues == absoluteTime && _showAbsoluteDate == absoluteDate ) return; _showAbsoluteValues = absoluteTime; _showAbsoluteDate = absoluteDate; _ofs = _showAbsoluteValues ? (double)_alignment : 0; setLineCount(_showAbsoluteDate ? 2 : 1); updateIntervals(); update(); }
void RazorPanel::readSettings() { // Read settings ...................................... mSettings->beginGroup(CFG_PANEL_GROUP); // By default we are using size & count from theme. setLineSize(mSettings->value(CFG_KEY_LINESIZE, mLineSize).toInt()); setLineCount(mSettings->value(CFG_KEY_LINECNT, mLineCount).toInt()); setLength(mSettings->value(CFG_KEY_LENGTH, 100).toInt(), mSettings->value(CFG_KEY_PERCENT, true).toBool()); setPosition(mSettings->value(CFG_KEY_SCREENNUM, QApplication::desktop()->primaryScreen()).toInt(), strToPosition(mSettings->value(CFG_KEY_POSITION).toString(), PositionBottom)); setAlignment(RazorPanel::Alignment(mSettings->value(CFG_KEY_ALIGNMENT, mAlignment).toInt())); mSettings->endGroup(); }