QamTachymeter::QamTachymeter(QWidget* parent ) : QamFlightInstrument(parent) { m_class = "QamTachymeter" ; setLabel(QString("TURBINE"), TURBINE ) ; setUnit(QString("x 1000"), TURBINE ) ; setMinMax(0, 40000, TURBINE ) ; setThresholds(32000, 35000, TURBINE ) ; setValue(0, TURBINE ) ; m_radius[TURBINE] = QFI_RADIUS ; m_start[TURBINE] = 120 ; m_span[TURBINE] = 300 ; m_min[TURBINE] = 0 ; m_max[TURBINE] = 40 ; m_step[TURBINE] = m_span[TURBINE] / ( m_max[TURBINE] - m_min[TURBINE] ) ; setLabel(QString("ROTOR"), ROTOR ) ; setUnit(QString("t/mn x 100"), ROTOR ) ; setMinMax(0, 450, ROTOR ) ; setThresholds(280, 420, ROTOR ) ; setValue(0, ROTOR ) ; m_radius[ROTOR] = 0.6 * QFI_RADIUS ; m_start[ROTOR] = 120 ; m_span[ROTOR] = 320 ; m_min[ROTOR] = 0 ; m_max[ROTOR] = 45 ; m_step[ROTOR] = m_span[ROTOR] / ( m_max[ROTOR] - m_min[ROTOR] ) ; // animation des aiguilles (pour tests) setAdjustable(100, 0, TURBINE ) ; // connect(this, SIGNAL( selectChanged() ), this, SLOT( selectChanged() ) ) ; }
LRESULT SharingOptionsPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items, listItems, GetDlgItem(IDC_SHARINGLIST)); //refresh setMinMax(IDC_REFRESH_SPIN, 0, 3000); setMinMax(IDC_INCOMING_SPIN, 0, 1000); setMinMax(IDC_MONITORING_SECONDS_SPIN, 1, 1000); ctrlThreadedRefresh.Attach(GetDlgItem(IDC_MULTITHREADED_REFRESH)); ctrlThreadedRefresh.InsertString(0, CTSTRING(NEVER)); ctrlThreadedRefresh.InsertString(1, CTSTRING(MANUAL_REFRESHES)); ctrlThreadedRefresh.InsertString(2, CTSTRING(ALWAYS)); ctrlThreadedRefresh.SetCurSel(SETTING(REFRESH_THREADING)); ctrlDelayMode.Attach(GetDlgItem(IDC_DELAY_MODE)); ctrlDelayMode.InsertString(0, CTSTRING(MONITOR_DELAY_DIR)); ctrlDelayMode.InsertString(1, CTSTRING(MONITOR_DELAY_VOLUME)); ctrlDelayMode.InsertString(2, CTSTRING(MONITOR_DELAY_ANY)); ctrlDelayMode.SetCurSel(SETTING(DELAY_COUNT_MODE)); ctrlMonitoringMode.Attach(GetDlgItem(IDC_MONITORING_MODE)); ctrlMonitoringMode.InsertString(0, CTSTRING(DISABLED)); ctrlMonitoringMode.InsertString(1, CTSTRING(INCOMING_ONLY)); ctrlMonitoringMode.InsertString(2, CTSTRING(ALL_DIRS)); ctrlMonitoringMode.SetCurSel(SETTING(MONITORING_MODE)); // Do specialized reading here return TRUE; }
void x_at(const _Point& p1, const _Point& p2, double top, double bottom, int flags, double& minX, double& maxX) { if (approximately_equal(p1.y, p2.y)) { // It should be OK to bail early in this case. There's another edge // which shares this end point which can intersect without failing to // have a slope ... maybe return; } // p2.x is always greater than p1.x -- the part of points (p1, p2) are // moving from the start of the cubic towards its end. // if p1.y < p2.y, minX can be affected // if p1.y > p2.y, maxX can be affected double slope = (p2.x - p1.x) / (p2.y - p1.y); int topFlags = flags & (kFindTopMin | kFindTopMax); if (topFlags && ((top <= p1.y && top >= p2.y) || (top >= p1.y && top <= p2.y))) { double x = p1.x + (top - p1.y) * slope; setMinMax(x, topFlags, minX, maxX); } int bottomFlags = flags & (kFindBottomMin | kFindBottomMax); if (bottomFlags && ((bottom <= p1.y && bottom >= p2.y) || (bottom >= p1.y && bottom <= p2.y))) { double x = p1.x + (bottom - p1.y) * slope; setMinMax(x, bottomFlags, minX, maxX); } }
LRESULT AirAppearancePage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); setMinMax(IDC_RESIZE_LINES_SPIN, 1, 10); //ApexDC setMinMax(IDC_PM_LINESSPIN, 0, 999); // Do specialized reading here return TRUE; }
LRESULT MiscPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); //histories setMinMax(IDC_SEARCH_HIST_SPIN, 0, 50); setMinMax(IDC_EXCLUDE_HIST_SPIN, 0, 50); setMinMax(IDC_DIR_HIST_SPIN, 0, 50); CurSel = SETTING(MEDIA_PLAYER); WinampStr = Text::toT(SETTING(WINAMP_FORMAT)); iTunesStr = Text::toT(SETTING(ITUNES_FORMAT)); MPCStr = Text::toT(SETTING(MPLAYERC_FORMAT)); WMPlayerStr = Text::toT(SETTING(WMP_FORMAT)); SpotifyStr = Text::toT(SETTING(SPOTIFY_FORMAT)); ctrlPlayer.Attach(GetDlgItem(IDC_PLAYER_COMBO)); ctrlPlayer.AddString(_T("Winamp")); ctrlPlayer.AddString(_T("iTunes")); ctrlPlayer.AddString(_T("Media Player Classic")); ctrlPlayer.AddString(_T("Windows Media Player")); ctrlPlayer.AddString(_T("Spotify")); ctrlPlayer.SetCurSel(CurSel); if(CurSel == 0) { SetDlgItemText(IDC_WINAMP, WinampStr.c_str()); } else if(CurSel == 1) { SetDlgItemText(IDC_WINAMP, iTunesStr.c_str()); } else if(CurSel == 2) { SetDlgItemText(IDC_WINAMP, MPCStr.c_str()); } else if(CurSel == 3) { SetDlgItemText(IDC_WINAMP, WMPlayerStr.c_str()); } else if(CurSel == 4) { SetDlgItemText(IDC_WINAMP, SpotifyStr.c_str()); } else { SetDlgItemText(IDC_WINAMP, CTSTRING(NO_MEDIA_SPAM)); ::EnableWindow(GetDlgItem(IDC_WINAMP), false); ::EnableWindow(GetDlgItem(IDC_WINAMP_HELP), false); } SetDlgItemText(IDC_WINAMP_PATH, Text::toT(SETTING(WINAMP_PATH)).c_str()); fixControls(); return TRUE; }
void WeatherChart::paintEvent(QPaintEvent *) { resetPaintRect(); QPainter p; p.begin(this); if (scaleRect.width() == 0 && scaleRect.height() == 0) { setMinMax(); resetZoom(); } p.setBrush(QColor(20,20,20)); p.setPen(QColor(20,20,20)); p.drawRect(0, 0, width(), height()); drawAxes(&p); drawChart(&p); if (scaling) drawScaleRect(&p); p.end(); }
void addVertex(osg::Vec3 pos) { _previous = pos; pos *= _coord_scale; if (!_verts->empty() && _verts->back()==pos) { // OSG_NOTICE<<"addVertex("<<pos<<") duplicate, ignoring"<<std::endl; return; } if (!_currentPrimitiveSet) { _currentPrimitiveSet = new osg::DrawElementsUShort( osg::PrimitiveSet::POLYGON); _currentPrimitiveSet->setName("boundary"); } if (!(_currentPrimitiveSet->empty()) && (*_verts)[(*_currentPrimitiveSet)[0]] == pos) { _currentPrimitiveSet->push_back( (*_currentPrimitiveSet)[0] ); } else { _currentPrimitiveSet->push_back( _verts->size() ); _verts->push_back( pos ); setMinMax(pos); } }
// Center mesh around origin. // Fit mesh in box from (-1, -1, -1) to (1, 1, 1) void Mesh::Normalize() { float min[3], max[3], Scale; setMinMax(min, max); Vec3 minv(min); Vec3 maxv(max); Vec3 dimv = maxv - minv; if (dimv.x >= dimv.y && dimv.x >= dimv.z) Scale = 2.0f/dimv.x; else if (dimv.y >= dimv.x && dimv.y >= dimv.z) Scale = 2.0f/dimv.y; else Scale = 2.0f/dimv.z; Vec3 transv = minv + maxv; transv *= 0.5f; for (unsigned int i = 0; i < _vlist.size(); ++i) { _vlist[i].getXYZ() -= transv; _vlist[i].getXYZ() *= Scale; } }
LRESULT HashingPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { // Do specialized reading here PropPage::read((HWND)*this, items); PropPage::translate((HWND)(*this), texts); //hashing setMinMax(IDC_HASH_SPIN, 0, 9999); setMinMax(IDC_VOL_HASHERS_SPIN, 1, 30); setMinMax(IDC_HASHING_THREADS_SPIN, 1, 50); CheckDlgButton(IDC_REPAIR_HASHDB, HashManager::getInstance()->isRepairScheduled()); updateSizes(); fixControls(); return TRUE; }
// *************************************************************************** void CAABBox::extend(const CVector &v) { CVector bmin= getMin(), bmax= getMax(); bmin.minof(bmin, v); bmax.maxof(bmax, v); setMinMax(bmin, bmax); }
void WeatherChart::resetZoom() { setMinMax(); first = 1; last = EventData::getInstance().getWeather().getSize(weatherId); tMin = min; tMax = max; }
LRESULT DownloadingOptionsPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); PropPage::read((HWND)*this, items, optionItems, GetDlgItem(IDC_OTHER_SKIPPING_OPTIONS)); setMinMax(IDC_I_DOWN_SPEED_SPIN, 0, 99999); setMinMax(IDC_TIME_DOWN_SPIN, 1, 99999); setMinMax(IDC_H_DOWN_SPEED_SPIN, 0, 99999); setMinMax(IDC_MIN_FILE_SIZE_SPIN, 0, 99999); setMinMax(IDC_REMOVE_SPIN, 0, 99999); setMinMax(IDC_SOURCES_SPIN, 1, 99999); setMinMax(IDC_RECENT_SPIN, 0, 99999); disconnectMode.Attach(GetDlgItem(IDC_AUTO_DISCONNECT_MODE)); disconnectMode.AddString(CTSTRING(FILE)); disconnectMode.AddString(CTSTRING(BUNDLE)); disconnectMode.AddString(CTSTRING(WHOLE_QUEUE)); /*disconnectMode.AddString(Text::toLower(TSTRING(FILE)).c_str()); disconnectMode.AddString(Text::toLower(TSTRING(BUNDLE)).c_str()); disconnectMode.AddString(Text::toLower(TSTRING(WHOLE_QUEUE)).c_str());*/ disconnectMode.SetCurSel(SETTING(DL_AUTO_DISCONNECT_MODE)); // Do specialized reading here return TRUE; }
LRESULT SearchPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read(*this, items, listItems, GetDlgItem(IDC_ADVANCED_BOOLEANS)); CUpDownCtrl updown; setMinMax(IDC_SEARCH_HISTORY_SPIN, 1, 100); setMinMax(IDC_INTERVAL_SPIN, 2, 100); setMinMax(IDC_MATCH_SPIN, 1, 999); setMinMax(IDC_AUTO_SEARCH_LIMIT_SPIN, 1, 999); ctrlList.Attach(GetDlgItem(IDC_ADVANCED_BOOLEANS)); // [+] IRainman fixControls(); // Do specialized reading here return TRUE; }
void UniformGrid::calculateBB(std::vector<RTMesh>* p_mesh, Vector3 p_numVoxels) { std::vector<RTMesh> :: iterator meshIt; for(meshIt = p_mesh->begin(); meshIt!=p_mesh->end(); ++meshIt){ std::vector<RTTriangle>* trianglesArray = meshIt->getTriangles(); for(int i=0; i<trianglesArray->size(); i++){ RTTriangle currentTriangle = trianglesArray->at(i); setMinMax(currentTriangle.v1); setMinMax(currentTriangle.v2); setMinMax(currentTriangle.v3); } } m_numVoxels = Vector3(p_numVoxels); m_gridSize = Vector3(fabsf(m_max.x - m_min.x), fabsf(m_max.y - m_min.y), fabsf(m_max.z - m_min.z)); m_voxelSize = Vector3(m_gridSize.x / p_numVoxels.x, m_gridSize.y / p_numVoxels.y, m_gridSize.z / p_numVoxels.z); }
/*! Sets the range in the print dialog to be from \a from to \a to. */ void QAbstractPrintDialog::setFromTo(int from, int to) { Q_D(QAbstractPrintDialog); Q_ASSERT_X(from <= to, "QAbstractPrintDialog::setFromTo", "'from' must be less than or equal to 'to'"); d->printer->setFromTo(from, to); if (d->minPage == 0 && d->maxPage == 0) setMinMax(1, to); }
// fills polys with raft type infill // so this layer will have the raft as normal infill void Layer::CalcRaftInfill (const vector<Poly> &polys, double extrusionfactor, double infilldistance, double rotation) { setMinMax(polys); normalInfill = new Infill(this, extrusionfactor); normalInfill->setName("Raft"); normalInfill->addPolys(Z, polys, RaftInfill, infilldistance, infilldistance, rotation); }
LRESULT SpeedPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); ctrlDownload.Attach(GetDlgItem(IDC_DL_SPEED)); ctrlUpload.Attach(GetDlgItem(IDC_CONNECTION)); cAutoDL.Attach(GetDlgItem(IDC_DL_AUTODETECT)); cAutoUL.Attach(GetDlgItem(IDC_UL_AUTODETECT)); ctrlMcnUL.Attach(GetDlgItem(IDC_MCNULSLOTS)); ctrlMcnDL.Attach(GetDlgItem(IDC_MCNDLSLOTS)); WinUtil::appendSpeedCombo(ctrlDownload, SettingsManager::DOWNLOAD_SPEED); WinUtil::appendSpeedCombo(ctrlUpload, SettingsManager::UPLOAD_SPEED); PropPage::read((HWND)*this, items); PropPage::read((HWND)*this, downloadItems); PropPage::read((HWND)*this, uploadItems); PropPage::read((HWND)*this, mcnItems); // set the correct values if using auto detection updateValues(0); setMinMax(IDC_SLOTSPIN, 1, UD_MAXVAL); setMinMax(IDC_MIN_UPLOAD_SPIN, 0, UD_MAXVAL); setMinMax(IDC_AUTO_SLOTS_SPIN, 0, 100); setMinMax(IDC_SLOTSPIN, 1, UD_MAXVAL); setMinMax(IDC_SLOTSSPIN, 0, 100); setMinMax(IDC_SPEEDSPIN, 0, 90000); setMinMax(IDC_EXTRASLOTSSPIN, 0, 100); setMinMax(IDC_MCN_SPIN, 1, 1000); setMinMax(IDC_MCN_SPIN2, 1, 1000); setMinMax(IDC_MAX_RUNNING_BUNDLES_SPIN, 0, 1000); fixControls(); loading = false; return TRUE; }
/** DataSnapshot holds a single copy of the buffer. */ DataSnapshot (const String& name, const float* dataToCopy, int size, float min, float max) : data (size* sizeof (float), false), size (size), name (name) { data.copyFrom (dataToCopy, 0, sizeof (float) * size); setMinMax (min, max); }
IntRange::IntRange(int value,int minValue,int maxValue) { setMinMax(minValue,maxValue); if (value < minValue) val=minValue; else if (value < maxValue) val=maxValue; else val=value; }
//========================================================================== void CAABBox::computeIntersection(const CAABBox &b1, const CAABBox &b2) { CVector min1 = b1.getMin(), max1 = b1.getMax(), min2 = b2.getMin(), max2 = b2.getMax(); CVector minr, maxr; // don't test if intersect or not. maxr.minof(max1, max2); minr.maxof(min1, min2); setMinMax(minr, maxr); }
LRESULT SearchPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); setMinMax(IDC_INTERVAL_SPIN, 5, 9999); setMinMax(IDC_EXPIRY_SPIN, 0, 90); setMinMax(IDC_DELAY_SPIN, 0, 999); setMinMax(IDC_AS_MIN_INTERVAL_SPIN, 1, 999); failedGroup.Attach(GetDlgItem(IDC_FAILED_GROUP)); auto curSetting = SETTING(AS_FAILED_DEFAULT_GROUP); failedGroup.AddString(_T("---")); failedGroup.SetCurSel(0); auto groups = AutoSearchManager::getInstance()->getGroups(); for (const auto& i : groups) { int pos = failedGroup.AddString(Text::toT(i).c_str()); if (i == curSetting) failedGroup.SetCurSel(pos); } return TRUE; }
LRESULT WizardConnspeed::OnInitDialog(UINT /*message*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /* bHandled */) { PropPage::translate((HWND)(*this), texts); ctrlDownload.Attach(GetDlgItem(IDC_DOWN_SPEED)); ctrlUpload.Attach(GetDlgItem(IDC_CONNECTION)); setMinMax(IDC_DOWN_SPEED_SPIN, 0, 100000); setMinMax(IDC_DOWNLOAD_S_SPIN, 0, 999); setMinMax(IDC_UPLOAD_S_SPIN, 1, 100); setMinMax(IDC_UP_SPEED_SPIN, 1, 100); setMinMax(IDC_AUTO_SLOTS_SPIN, 1, 100); //fill the speed combos WinUtil::appendSpeedCombo(ctrlDownload, SettingsManager::DOWNLOAD_SPEED); WinUtil::appendSpeedCombo(ctrlUpload, SettingsManager::UPLOAD_SPEED); //Set current values SetDlgItemText(IDC_MAX_DOWNLOAD_SP, Text::toT(Util::toString(AirUtil::getSpeedLimit(true))).c_str()); SetDlgItemText(IDC_DOWNLOAD_SLOTS, Text::toT(Util::toString(AirUtil::getSlots(true))).c_str()); SetDlgItemText(IDC_UPLOAD_SLOTS, Text::toT(Util::toString(AirUtil::getSlots(false))).c_str()); SetDlgItemText(IDC_MAX_UPLOAD_SP, Text::toT(Util::toString(AirUtil::getSpeedLimit(false))).c_str()); SetDlgItemText(IDC_MAX_AUTO_OPENED, Text::toT(Util::toString(AirUtil::getMaxAutoOpened())).c_str()); cAutoDL.Attach(GetDlgItem(IDC_DL_AUTODETECT)); cAutoUL.Attach(GetDlgItem(IDC_UL_AUTODETECT)); cAutoDL.SetCheck(SETTING(DL_AUTODETECT) ? BST_CHECKED : BST_UNCHECKED); cAutoUL.SetCheck(SETTING(UL_AUTODETECT) ? BST_CHECKED : BST_UNCHECKED); fixcontrols(); return TRUE; }
QHA::QHA(QWidget* parent ) : QamFlightInstrument(parent) //, m_sec( 0 ) //, m_autoTime( true ) { setMinMax(-90, 90, QHE ) ; setValue(0, QHE); setMinMax(-90, 90, QHE2 ) ; setValue(0, QHE2); //setMinMax(0, 59, MINUTE ) ; //setMinMax(0, 59, ELAPSEDMIN ) ; //setMinMax(0, 59, ELAPSEDSEC ) ; //setValue(0, ELAPSEDMIN ) ; //setValue(0, ELAPSEDSEC ) ; m_start[QHE] = 0 ; m_span[QHE] = 360 ; m_min[QHE] = 0; m_max[QHE] = 360; m_radius[QHE] = 0.83 * QFI_RADIUS ; m_radius[QHE2] = QFI_RADIUS ; //timeout() ; // mise à l'heure initiale // m_timer = new QTimer(this) ; //connect(m_timer, SIGNAL(timeout()), this, SLOT(timeout()) ) ; // m_timer->start(1000) ; // période 1 seconde // BP --> 3-function operating knob (start-stop-reset) connect(this, SIGNAL( selectPressed(int num, bool longClic = false ) ), this, SLOT( selectPressed(int num, bool longClic = false ) ) ) ; setAdjustable(-1,0,QHE); }
void QPrinter::interpret(PMPrintSettings *s) { //get values UInt32 from, to; if (PMGetFirstPage(*s, &from) == noErr && PMGetLastPage(*s, &to) == noErr) { if (to == INT_MAX) //this means all pages! from = to = 0; setFromTo(from, to); } UInt32 copies; if (PMGetCopies(*s, &copies) == noErr) setNumCopies(copies); UInt32 max, min; if (PMGetPageRange(*s, &min, &max) == noErr) { // The problem here is that Apple's print dialog will always show a one even when you pass // it a zero. So take care of that. The other problem is that we can also call this because // we need to interpret the default settings, in that case, the min and max will both be // zero. In that case, leave them "as is" as some other functions will reset the max and // make everything OK when the dialog is actually called. int newMin = min; int newMax = max; if (newMin < 1 && newMax != 0) newMin = 1; setMinMax(newMin, newMax); } PMColorMode cm; if (PMGetColorMode(*s, &cm) == noErr) setColorMode(cm == kPMGray ? GrayScale : Color); // Get the current Printer Name CFIndex currPrinterIndex; PMPrinter currPrinter; CFArrayRef printerArray; OSStatus err = PMSessionCreatePrinterList(psession, &printerArray, &currPrinterIndex, &currPrinter); if (err != noErr) qWarning("Qt: QPrinter::interpret problem creating printer list %ld", err); if (printerArray) { setPrinterName(cfstring2qstring((CFStringRef)CFArrayGetValueAtIndex(printerArray, currPrinterIndex))); CFRelease(printerArray); } }
void WetDryChart::paintEvent(QPaintEvent *) { resetPaintRect(); setMinMax(); QPainter p; p.begin(this); p.setBrush(QColor(20,20,20)); p.setPen(QColor(20,20,20)); p.drawRect(0, 0, width(), height()); drawAxes(&p); drawChart(&p); p.end(); }
LRESULT LimitPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); //advanced limits start setMinMax(IDC_PARTIAL_SLOTS_SPIN, 0, 10); setMinMax(IDC_SMALL_FILE_SIZE_SPIN, 64, 30000); setMinMax(IDC_EXTRA_SLOTS_SPIN, 3, 100); //limiter start setMinMax(IDC_UPLOADSPEEDSPIN, 0, 99999); setMinMax(IDC_DOWNLOADSPEEDSPIN, 0, 99999); setMinMax(IDC_UPLOADSPEEDSPIN_TIME, 0, 99999); setMinMax(IDC_DOWNLOADSPEEDSPIN_TIME, 0, 99999); timeCtrlBegin.Attach(GetDlgItem(IDC_BW_START_TIME)); timeCtrlEnd.Attach(GetDlgItem(IDC_BW_END_TIME)); timeCtrlBegin.AddString(CTSTRING(MIDNIGHT)); timeCtrlEnd.AddString(CTSTRING(MIDNIGHT)); for (int i = 1; i < 12; ++i) { timeCtrlBegin.AddString((Util::toStringW(i) + CTSTRING(AM)).c_str()); timeCtrlEnd.AddString((Util::toStringW(i) + CTSTRING(AM)).c_str()); } timeCtrlBegin.AddString(CTSTRING(NOON)); timeCtrlEnd.AddString(CTSTRING(NOON)); for (int i = 1; i < 12; ++i) { timeCtrlBegin.AddString((Util::toStringW(i) + CTSTRING(PM)).c_str()); timeCtrlEnd.AddString((Util::toStringW(i) + CTSTRING(PM)).c_str()); } timeCtrlBegin.SetCurSel(SETTING(BANDWIDTH_LIMIT_START)); timeCtrlEnd.SetCurSel(SETTING(BANDWIDTH_LIMIT_END)); timeCtrlBegin.Detach(); timeCtrlEnd.Detach(); fixControls(); // Do specialized reading here return TRUE; }
LRESULT DownloadPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items, 0, 0); PropPage::read((HWND)*this, items, optionItems, GetDlgItem(IDC_OTHER_QUEUE_OPTIONS)); setMinMax(IDC_INTERVAL_SPIN, 5, 9999); setMinMax(IDC_MATCH_SPIN, 1, 999); setMinMax(IDC_AUTO_SEARCH_LIMIT_SPIN, 1, 999); setMinMax(IDC_SEG_NUMBER_SPIN, 1, 10); setMinMax(IDC_SEARCH_SPIN, 5, 60); setMinMax(IDC_BEGIN_SPIN, 2, 100000); checkItems(); // Do specialized reading here return TRUE; }
// reset the pool void MUSet::reset(QVector<MUPool>* set) { muSet = *set; setMinMax(); }
// // Working with a set of motor units // MUSet::MUSet(QVector<MUPool>* set) : muSet(*set) { setMinMax(); }
LRESULT SDCPage::onInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { PropPage::translate((HWND)(*this), texts); PropPage::read((HWND)*this, items); setMinMax(IDC_BUFFER_SPIN, 0, 4096); setMinMax(IDC_READ_SPIN, 1024, 1024*1024); setMinMax(IDC_WRITE_SPIN, 1024, 1024*1024); setMinMax(IDC_DOWNCONN_SPIN, 0, 5); setMinMax(IDC_MAX_COMP_SPIN, 0, 9); setMinMax(IDC_SHUTDOWN_SPIN , 1, 3600); setMinMax(IDC_LOG_LINES_SPIN, 0, 1000); ctrlBloom.Attach(GetDlgItem(IDC_BLOOM_MODE)); ctrlBloom.AddString(CTSTRING(DISABLED)); ctrlBloom.AddString(CTSTRING(ENABLED)); ctrlBloom.SetCurSel(SETTING(BLOOM_MODE)); ctrlShutdownAction.Attach(GetDlgItem(IDC_COMBO1)); ctrlShutdownAction.AddString(CTSTRING(POWER_OFF)); ctrlShutdownAction.AddString(CTSTRING(LOG_OFF)); ctrlShutdownAction.AddString(CTSTRING(REBOOT)); ctrlShutdownAction.AddString(CTSTRING(SUSPEND)); ctrlShutdownAction.AddString(CTSTRING(HIBERNATE)); ctrlShutdownAction.SetCurSel(SETTING(SHUTDOWN_ACTION)); // Do specialized reading here userlistaction.Attach(GetDlgItem(IDC_USERLIST_DBLCLICK)); transferlistaction.Attach(GetDlgItem(IDC_TRANSFERLIST_DBLCLICK)); chataction.Attach(GetDlgItem(IDC_CHAT_DBLCLICK)); userlistaction.AddString(CTSTRING(GET_FILE_LIST)); userlistaction.AddString(CTSTRING(SEND_PUBLIC_MESSAGE)); userlistaction.AddString(CTSTRING(SEND_PRIVATE_MESSAGE)); userlistaction.AddString(CTSTRING(MATCH_QUEUE)); userlistaction.AddString(CTSTRING(GRANT_EXTRA_SLOT)); userlistaction.AddString(CTSTRING(ADD_TO_FAVORITES)); userlistaction.AddString(CTSTRING(BROWSE_FILE_LIST)); transferlistaction.AddString(CTSTRING(SEND_PRIVATE_MESSAGE)); transferlistaction.AddString(CTSTRING(GET_FILE_LIST)); transferlistaction.AddString(CTSTRING(MATCH_QUEUE)); transferlistaction.AddString(CTSTRING(GRANT_EXTRA_SLOT)); transferlistaction.AddString(CTSTRING(ADD_TO_FAVORITES)); transferlistaction.AddString(CTSTRING(BROWSE_FILE_LIST)); chataction.AddString(CTSTRING(SELECT_USER_LIST)); chataction.AddString(CTSTRING(SEND_PUBLIC_MESSAGE)); chataction.AddString(CTSTRING(SEND_PRIVATE_MESSAGE)); chataction.AddString(CTSTRING(GET_FILE_LIST)); chataction.AddString(CTSTRING(MATCH_QUEUE)); chataction.AddString(CTSTRING(GRANT_EXTRA_SLOT)); chataction.AddString(CTSTRING(ADD_TO_FAVORITES)); userlistaction.SetCurSel(SETTING(USERLIST_DBLCLICK)); transferlistaction.SetCurSel(SETTING(TRANSFERLIST_DBLCLICK)); chataction.SetCurSel(SETTING(CHAT_DBLCLICK)); userlistaction.Detach(); transferlistaction.Detach(); chataction.Detach(); return TRUE; }