BucketDistribution::BucketDistribution(uint32_t numColumns, uint32_t numBucketBits) : _numColumns(0), _numBucketBits(numBucketBits), _bucketToColumn(), _lock() { _bucketToColumn.resize(getNumBuckets()); reset(); setNumColumns(numColumns); }
caBitnames::caBitnames(QWidget *parent) : EFlag(parent) { setNumColumns(1); thisStartBit=0; thisEndBit = 15; setStartBit(0); setEndBit(15); thisString = ""; setTrueColor(Qt::blue); setFalseColor(Qt::gray); numRows = 16; thisAlignment = EFlag::left; setFontScaleMode(ESimpleLabel::WidthAndHeight); setEnumStrings("1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16"); setValue(0); }
void BucketDistribution::setNumBucketBits(uint32_t numBucketBits) { uint32_t numColumns; { vespalib::LockGuard guard(_lock); if (numBucketBits == _numBucketBits) { return; } _numBucketBits = numBucketBits; _bucketToColumn.resize(getNumBuckets(numBucketBits)); numColumns = _numColumns; reset(); } setNumColumns(numColumns); }
void ServerConfig::loadSettings() { settings().beginGroup("internalConfig"); setNumColumns(settings().value("numColumns", 5).toInt()); setNumRows(settings().value("numRows", 3).toInt()); // we need to know the number of columns and rows before we can set up ourselves init(); haveHeartbeat(settings().value("hasHeartbeat", false).toBool()); setHeartbeat(settings().value("heartbeat", 5000).toInt()); setRelativeMouseMoves(settings().value("relativeMouseMoves", false).toBool()); setScreenSaverSync(settings().value("screenSaverSync", true).toBool()); setWin32KeepForeground(settings().value("win32KeepForeground", false).toBool()); haveSwitchDelay(settings().value("hasSwitchDelay", false).toBool()); setSwitchDelay(settings().value("switchDelay", 250).toInt()); haveSwitchDoubleTap(settings().value("hasSwitchDoubleTap", false).toBool()); setSwitchDoubleTap(settings().value("switchDoubleTap", 250).toInt()); setSwitchCornerSize(settings().value("switchCornerSize").toInt()); setIgnoreAutoConnectClient(settings().value("ignoreAutoConnectClient").toBool()); readSettings(settings(), switchCorners(), "switchCorner", false, NumSwitchCorners); int numScreens = settings().beginReadArray("screens"); Q_ASSERT(numScreens <= screens().size()); for (int i = 0; i < numScreens; i++) { settings().setArrayIndex(i); screens()[i].loadSettings(settings()); } settings().endArray(); int numHotkeys = settings().beginReadArray("hotkeys"); for (int i = 0; i < numHotkeys; i++) { settings().setArrayIndex(i); Hotkey h; h.loadSettings(settings()); hotkeys().append(h); } settings().endArray(); settings().endGroup(); }