void QgsRasterFormatSaveOptionsWidget::setProvider( QString provider )
{
  mProvider = provider;
  updateControls();
}
void mmStockDialog::onFocusChange(wxChildFocusEvent& event)
{
    updateControls();
    event.Skip();
}
LRESULT CommandDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
    // Translate
    SetWindowText(CTSTRING(USER_CMD_WINDOW));

#define ATTACH(id, var) var.Attach(GetDlgItem(id))
    ATTACH(IDC_NAME, ctrlName);
    ATTACH(IDC_HUB, ctrlHub);
    ATTACH(IDC_SETTINGS_SEPARATOR, ctrlSeparator);
    ATTACH(IDC_SETTINGS_RAW, ctrlRaw);
    ATTACH(IDC_SETTINGS_CHAT, ctrlChat);
    ATTACH(IDC_SETTINGS_PM, ctrlPM);
    ATTACH(IDC_SETTINGS_ONCE, ctrlOnce);
    ATTACH(IDC_SETTINGS_HUB_MENU, ctrlHubMenu);
    ATTACH(IDC_SETTINGS_USER_MENU, ctrlUserMenu);
    ATTACH(IDC_SETTINGS_SEARCH_MENU, ctrlSearchMenu);
    ATTACH(IDC_SETTINGS_FILELIST_MENU, ctrlFilelistMenu);
    ATTACH(IDC_NICK, ctrlNick);
    ATTACH(IDC_COMMAND, ctrlCommand);

    WinUtil::translate(*this, texts);
    SetDlgItemText(IDC_COMMAND_DESCRIPTION, CTSTRING(USER_CMD_DESCRIPTION));

    int newType = 0;
    if(type == UserCommand::TYPE_SEPARATOR) {
        ctrlSeparator.SetCheck(BST_CHECKED);
        newType = 0;
    } else {
        ctrlCommand.SetWindowText(Text::toDOS(command).c_str());
        if(type == UserCommand::TYPE_RAW || type == UserCommand::TYPE_RAW_ONCE) {
            ctrlRaw.SetCheck(BST_CHECKED);
            newType = 1;
        } else if(type == UserCommand::TYPE_CHAT || type == UserCommand::TYPE_CHAT_ONCE) {
            if(to.empty()) {
                ctrlChat.SetCheck(BST_CHECKED);
                newType = 2;
            } else {
                ctrlPM.SetCheck(BST_CHECKED);
                ctrlNick.SetWindowText(to.c_str());
                newType = 3;
            }
        }

        if(type == UserCommand::TYPE_RAW_ONCE || type == UserCommand::TYPE_CHAT_ONCE) {
            ctrlOnce.SetCheck(BST_CHECKED);
        }
    }
    type = newType;

    ctrlHub.SetWindowText(hub.c_str());
    ctrlName.SetWindowText(name.c_str());

    if(ctx & UserCommand::CONTEXT_HUB)
        ctrlHubMenu.SetCheck(BST_CHECKED);
    if(ctx & UserCommand::CONTEXT_USER)
        ctrlUserMenu.SetCheck(BST_CHECKED);
    if(ctx & UserCommand::CONTEXT_SEARCH)
        ctrlSearchMenu.SetCheck(BST_CHECKED);
    if(ctx & UserCommand::CONTEXT_FILELIST)
        ctrlFilelistMenu.SetCheck(BST_CHECKED);

    updateControls();
    updateCommand();

    ctrlSeparator.SetFocus();

    CenterWindow(GetParent());
    return FALSE;
}
Example #4
0
ViewKeysDialog::ViewKeysDialog(const QString& title, core::IDatabaseSPtr db, QWidget* parent)
  : QDialog(parent), cursorStack_(), curPos_(0), db_(db) {
  CHECK(db_);
  core::IServerSPtr serv = db_->server();
  VERIFY(connect(serv.get(), &core::IServer::startedLoadDataBaseContent,
                 this, &ViewKeysDialog::startLoadDatabaseContent));
  VERIFY(connect(serv.get(), &core::IServer::finishedLoadDatabaseContent,
                 this, &ViewKeysDialog::finishLoadDatabaseContent));

  setWindowTitle(title);

  // main layout
  QVBoxLayout* mainlayout = new QVBoxLayout;

  QHBoxLayout* searchLayout = new QHBoxLayout;
  searchBox_ = new QLineEdit;
  searchBox_->setText("*");
  VERIFY(connect(searchBox_, &QLineEdit::textChanged, this, &ViewKeysDialog::searchLineChanged));
  searchLayout->addWidget(searchBox_);

  countSpinEdit_ = new QSpinBox;
  countSpinEdit_->setRange(min_key_on_page, max_key_on_page);
  countSpinEdit_->setSingleStep(step_keys_on_page);
  countSpinEdit_->setValue(defaults_key);

  keyCountLabel_ = new QLabel;

  searchLayout->addWidget(keyCountLabel_);
  searchLayout->addWidget(countSpinEdit_);

  searchButton_ = new QPushButton;
  VERIFY(connect(searchButton_, &QPushButton::clicked,
                 this, &ViewKeysDialog::rightPageClicked));
  searchLayout->addWidget(searchButton_);

  keysModel_ = new KeysTableModel(this);
  VERIFY(connect(keysModel_, &KeysTableModel::changedValue,
                 this, &ViewKeysDialog::executeCommand, Qt::DirectConnection));

  VERIFY(connect(serv.get(), &core::IServer::startedExecuteCommand,
                 this, &ViewKeysDialog::startExecuteCommand, Qt::DirectConnection));
  VERIFY(connect(serv.get(), &core::IServer::finishedExecuteCommand,
                 this, &ViewKeysDialog::finishExecuteCommand, Qt::DirectConnection));
  keysTable_ = new FastoTableView;
  keysTable_->setModel(keysModel_);
  keysTable_->setItemDelegateForColumn(KeyTableItem::kTTL, new NumericDelegate(this));

  QDialogButtonBox* buttonBox = new QDialogButtonBox;
  buttonBox->setOrientation(Qt::Horizontal);
  buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
  VERIFY(connect(buttonBox, &QDialogButtonBox::accepted, this, &ViewKeysDialog::accept));
  VERIFY(connect(buttonBox, &QDialogButtonBox::rejected, this, &ViewKeysDialog::reject));
  mainlayout->addLayout(searchLayout);
  mainlayout->addWidget(keysTable_);

  leftButtonList_ = createButtonWithIcon(GuiFactory::instance().leftIcon());
  rightButtonList_ = createButtonWithIcon(GuiFactory::instance().rightIcon());
  VERIFY(connect(leftButtonList_, &QPushButton::clicked, this, &ViewKeysDialog::leftPageClicked));
  VERIFY(connect(rightButtonList_, &QPushButton::clicked, this, &ViewKeysDialog::rightPageClicked));
  QHBoxLayout* pagingLayout = new QHBoxLayout;
  pagingLayout->addWidget(leftButtonList_);
  core::IDataBaseInfoSPtr inf = db_->info();
  size_t keysCount = inf->dbKeysCount();
  currentKey_ = new QSpinBox;
  currentKey_->setEnabled(false);
  currentKey_->setValue(0);
  currentKey_->setMinimum(0);
  currentKey_->setMaximum(keysCount);
  countKey_ = new QSpinBox;
  countKey_->setEnabled(false);
  countKey_->setValue(keysCount);
  pagingLayout->addWidget(new QSplitter(Qt::Horizontal));
  pagingLayout->addWidget(currentKey_);
  pagingLayout->addWidget(countKey_);
  pagingLayout->addWidget(new QSplitter(Qt::Horizontal));
  pagingLayout->addWidget(rightButtonList_);

  mainlayout->addLayout(pagingLayout);
  mainlayout->addWidget(buttonBox);

  setMinimumSize(QSize(min_width, min_height));
  setLayout(mainlayout);

  updateControls();
  retranslateUi();
}
Example #5
0
bool CommandDlg::handleInitDialog() {
	setHelpId(IDH_USER_COMMAND);

	WinUtil::setHelpIds(this, helpItems);

	// Translate
	setText(T_("Create / Modify User Command"));
	setItemText(IDC_SETTINGS_TYPE, T_("Command Type"));
	setItemText(IDC_SETTINGS_CONTEXT, T_("Context"));
	setItemText(IDC_SETTINGS_PARAMETERS, T_("Parameters"));
	setItemText(IDC_SETTINGS_NAME, T_("Name"));
	setItemText(IDC_SETTINGS_COMMAND, T_("Command"));
	setItemText(IDC_SETTINGS_HUB, T_("Hub IP / DNS (empty = all, 'op' = where operator)"));
	setItemText(IDC_SETTINGS_TO, T_("To"));
	setItemText(IDC_USER_CMD_PREVIEW, T_("Text sent to hub"));

	attachChild(separator, IDC_SETTINGS_SEPARATOR);
	separator->setText(T_("Separator"));
	separator->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));

	attachChild(raw, IDC_SETTINGS_RAW);
	raw->setText(T_("Raw"));
	raw->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));

	attachChild(chat, IDC_SETTINGS_CHAT);
	chat->setText(T_("Chat"));
	chat->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));

	attachChild(PM, IDC_SETTINGS_PM);
	PM->setText(T_("PM"));
	PM->onClicked(std::tr1::bind(&CommandDlg::handleTypeChanged, this));

	hubMenu = attachChild<CheckBox>(IDC_SETTINGS_HUB_MENU);
	hubMenu->setText(T_("Hub Menu"));

	userMenu = attachChild<CheckBox>(IDC_SETTINGS_USER_MENU);
	userMenu->setText(T_("User Menu"));

	searchMenu = attachChild<CheckBox>(IDC_SETTINGS_SEARCH_MENU);
	searchMenu->setText(T_("Search Menu"));

	fileListMenu = attachChild<CheckBox>(IDC_SETTINGS_FILELIST_MENU);
	fileListMenu->setText(T_( "Filelist Menu"));

	nameBox = attachChild<TextBox>(IDC_NAME);

	commandBox = attachChild<TextBox>(IDC_COMMAND);
	commandBox->onUpdated(std::tr1::bind(&CommandDlg::updateCommand, this));

	hubBox = attachChild<TextBox>(IDC_HUB);

	nick = attachChild<TextBox>(IDC_NICK);
	nick->onUpdated(std::tr1::bind(&CommandDlg::updateCommand, this));

	once = attachChild<CheckBox>(IDC_SETTINGS_ONCE);
	once->setText(T_("Send once per nick"));

	result = attachChild<TextBox>(IDC_RESULT);

	openHelp = attachChild<CheckBox>(IDC_USER_CMD_OPEN_HELP);
	openHelp->setText(T_("Always open help file with this dialog"));
	bool bOpenHelp = BOOLSETTING(OPEN_USER_CMD_HELP);
	openHelp->setChecked(bOpenHelp);

	{
		ButtonPtr button = attachChild<Button>(IDOK);
		button->setText(T_("OK"));
		button->onClicked(std::tr1::bind(&CommandDlg::handleOKClicked, this));

		button = attachChild<Button>(IDCANCEL);
		button->setText(T_("Cancel"));
		button->onClicked(std::tr1::bind(&CommandDlg::endDialog, this, IDCANCEL));

		button = attachChild<Button>(IDHELP);
		button->setText(T_("Help"));
		button->onClicked(std::tr1::bind(&WinUtil::help, handle(), IDH_USER_COMMAND));
	}

	if(bOpenHelp) {
		// launch the help file, instead of having the help in the dialog
		WinUtil::help(handle(), IDH_USER_COMMAND);
	}

	if(type == UserCommand::TYPE_SEPARATOR) {
		separator->setChecked(true);
	} else {
		// More difficult, determine type by what it seems to be...
		if((_tcsncmp(command.c_str(), _T("$To: "), 5) == 0) &&
			(command.find(_T(" From: %[myNI] $<%[myNI]> ")) != string::npos ||
			command.find(_T(" From: %[mynick] $<%[mynick]> ")) != string::npos) &&
			command.find(_T('|')) == command.length() - 1) // if it has | anywhere but the end, it is raw
		{
			string::size_type i = command.find(_T(' '), 5);
			dcassert(i != string::npos);
			tstring to = command.substr(5, i-5);
			string::size_type cmd_pos = command.find(_T('>'), 5) + 2;
			tstring cmd = Text::toT(NmdcHub::validateMessage(Text::fromT(command.substr(cmd_pos, command.length()-cmd_pos-1)), true));
			PM->setChecked(true);
			nick->setText(to);
			commandBox->setText(cmd.c_str());
		} else if(((_tcsncmp(command.c_str(), _T("<%[mynick]> "), 12) == 0) ||
			(_tcsncmp(command.c_str(), _T("<%[myNI]> "), 10) == 0)) &&
			command[command.length()-1] == '|')
		{
			// Looks like a chat thing...
			string::size_type cmd_pos = command.find(_T('>')) + 2;
			tstring cmd = Text::toT(NmdcHub::validateMessage(Text::fromT(command.substr(cmd_pos, command.length()-cmd_pos-1)), true));
			chat->setChecked(true);
			commandBox->setText(cmd);
		} else {
			tstring cmd = command;
			raw->setChecked(true);
			commandBox->setText(cmd);
		}
		if(type == UserCommand::TYPE_RAW_ONCE) {
			once->setChecked(true);
			type = 1;
		}
	}

	hubBox->setText(hub);
	nameBox->setText(name);

	if(ctx & UserCommand::CONTEXT_HUB)
		hubMenu->setChecked(true);
	if(ctx & UserCommand::CONTEXT_CHAT)
		userMenu->setChecked(true);
	if(ctx & UserCommand::CONTEXT_SEARCH)
		searchMenu->setChecked(true);
	if(ctx & UserCommand::CONTEXT_FILELIST)
		fileListMenu->setChecked(true);

	updateControls();
	updateCommand();

	separator->setFocus();

	centerWindow();
	return false;
}
Example #6
0
//--------------------------------------------------------------
void testApp::update(){

	updateControls();
	tag.bMouseActive = true;
	
}
BOOL LLFloaterLagMeter::postBuild()
{
	// Don't let this window take keyboard focus -- it's confusing to
	// lose arrow-key driving when testing lag.
	setIsChrome(TRUE);
	
	// were we shrunk last time?
	if (isShrunk())
	{
		onClickShrink();
	}
	
	mClientButton = getChild<LLButton>("client_lagmeter");
	mClientText = getChild<LLTextBox>("client_text");
	mClientCause = getChild<LLTextBox>("client_lag_cause");

	mNetworkButton = getChild<LLButton>("network_lagmeter");
	mNetworkText = getChild<LLTextBox>("network_text");
	mNetworkCause = getChild<LLTextBox>("network_lag_cause");

	mServerButton = getChild<LLButton>("server_lagmeter");
	mServerText = getChild<LLTextBox>("server_text");
	mServerCause = getChild<LLTextBox>("server_lag_cause");

	std::string config_string = getString("client_frame_rate_critical_fps", mStringArgs);
	mClientFrameTimeCritical = 1.0f / (float)atof( config_string.c_str() );
	config_string = getString("client_frame_rate_warning_fps", mStringArgs);
	mClientFrameTimeWarning = 1.0f / (float)atof( config_string.c_str() );

	config_string = getString("network_packet_loss_critical_pct", mStringArgs);
	mNetworkPacketLossCritical = (float)atof( config_string.c_str() );
	config_string = getString("network_packet_loss_warning_pct", mStringArgs);
	mNetworkPacketLossWarning = (float)atof( config_string.c_str() );

	config_string = getString("network_ping_critical_ms", mStringArgs);
	mNetworkPingCritical = (float)atof( config_string.c_str() );
	config_string = getString("network_ping_warning_ms", mStringArgs);
	mNetworkPingWarning = (float)atof( config_string.c_str() );
	config_string = getString("server_frame_rate_critical_fps", mStringArgs);

	mServerFrameTimeCritical = 1000.0f / (float)atof( config_string.c_str() );
	config_string = getString("server_frame_rate_warning_fps", mStringArgs);
	mServerFrameTimeWarning = 1000.0f / (float)atof( config_string.c_str() );
	config_string = getString("server_single_process_max_time_ms", mStringArgs);
	mServerSingleProcessMaxTime = (float)atof( config_string.c_str() );

//	mShrunk = false;
	config_string = getString("max_width_px", mStringArgs);
	mMaxWidth = atoi( config_string.c_str() );
	config_string = getString("min_width_px", mStringArgs);
	mMinWidth = atoi( config_string.c_str() );

	mStringArgs["[CLIENT_FRAME_RATE_CRITICAL]"] = getString("client_frame_rate_critical_fps");
	mStringArgs["[CLIENT_FRAME_RATE_WARNING]"] = getString("client_frame_rate_warning_fps");

	mStringArgs["[NETWORK_PACKET_LOSS_CRITICAL]"] = getString("network_packet_loss_critical_pct");
	mStringArgs["[NETWORK_PACKET_LOSS_WARNING]"] = getString("network_packet_loss_warning_pct");

	mStringArgs["[NETWORK_PING_CRITICAL]"] = getString("network_ping_critical_ms");
	mStringArgs["[NETWORK_PING_WARNING]"] = getString("network_ping_warning_ms");

	mStringArgs["[SERVER_FRAME_RATE_CRITICAL]"] = getString("server_frame_rate_critical_fps");
	mStringArgs["[SERVER_FRAME_RATE_WARNING]"] = getString("server_frame_rate_warning_fps");

//	childSetAction("minimize", onClickShrink, this);
	updateControls(isShrunk()); // if expanded append colon to the labels (EXT-4079)

	return TRUE;
}
void DownloadPathState::onTempDirClearFailed(int task) {
	if (task & Local::ClearManagerDownloads) {
		_state = State::ClearFailed;
	}
	updateControls();
}
 void FaceAttribsEditor::documentWasLoaded(MapDocument* document) {
     m_faces = document->allSelectedBrushFaces();
     updateControls();
 }
void DlgSettingsExportFormat::load (CmdMediator &cmdMediator)
{
  LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsExportFormat::load";

  setCmdMediator (cmdMediator);

  // Flush old data
  if (m_modelExportBefore != 0) {
    delete m_modelExportBefore;
  }
  if (m_modelExportAfter != 0) {
    delete m_modelExportAfter;
  }

  // Save new data
  m_modelExportBefore = new DocumentModelExportFormat (cmdMediator.document());
  m_modelExportAfter = new DocumentModelExportFormat (cmdMediator.document());

  // Populate controls. First load excluded curves
  m_listExcluded->clear();
  QStringList curveNamesExcluded = m_modelExportAfter->curveNamesNotExported();
  QStringList::const_iterator itr;
  for (itr = curveNamesExcluded.begin (); itr != curveNamesExcluded.end(); ++itr) {
    QString curveNameNotExported = *itr;
    m_listExcluded->addItem (curveNameNotExported);
  }

  // Include curves that are not excluded
  m_listIncluded->clear();
  QStringList curveNamesAll = cmdMediator.document().curvesGraphsNames();
  for (itr = curveNamesAll.begin (); itr != curveNamesAll.end(); itr++) {
    QString curveName = *itr;
    if (!curveNamesExcluded.contains (curveName)) {
      m_listIncluded->addItem (curveName);
    }
  }

  ExportPointsSelectionFunctions pointsSelectionFunctions = m_modelExportAfter->pointsSelectionFunctions();
  m_btnFunctionsPointsAllCurves->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_ALL_CURVES);
  m_btnFunctionsPointsFirstCurve->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE);
  m_btnFunctionsPointsEvenlySpaced->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_PERIODIC);
  m_btnFunctionsPointsRaw->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_RAW);

  ExportLayoutFunctions layoutFunctions = m_modelExportAfter->layoutFunctions ();
  m_btnFunctionsLayoutAllCurves->setChecked (layoutFunctions == EXPORT_LAYOUT_ALL_PER_LINE);
  m_btnFunctionsLayoutOneCurve->setChecked (layoutFunctions == EXPORT_LAYOUT_ONE_PER_LINE);

  ExportPointsSelectionRelations pointsSelectionRelations = m_modelExportAfter->pointsSelectionRelations();
  m_btnRelationsPointsEvenlySpaced->setChecked (pointsSelectionRelations == EXPORT_POINTS_SELECTION_RELATIONS_INTERPOLATE);
  m_btnRelationsPointsRaw->setChecked (pointsSelectionRelations == EXPORT_POINTS_SELECTION_RELATIONS_RAW);

  ExportDelimiter delimiter = m_modelExportAfter->delimiter ();
  m_btnDelimitersCommas->setChecked (delimiter == EXPORT_DELIMITER_COMMA);
  m_btnDelimitersSpaces->setChecked (delimiter == EXPORT_DELIMITER_SPACE);
  m_btnDelimitersTabs->setChecked (delimiter == EXPORT_DELIMITER_TAB);

  ExportHeader header = m_modelExportAfter->header ();
  m_btnHeaderNone->setChecked (header == EXPORT_HEADER_NONE);
  m_btnHeaderSimple->setChecked (header == EXPORT_HEADER_SIMPLE);
  m_btnHeaderGnuplot->setChecked (header == EXPORT_HEADER_GNUPLOT);

  m_editXLabel->setText (m_modelExportAfter->xLabel());
  m_editFunctionsPointsEvenlySpacing->setText (QString::number (m_modelExportAfter->pointsIntervalFunctions()));
  m_editRelationsPointsEvenlySpacing->setText (QString::number (m_modelExportAfter->pointsIntervalRelations()));

  ExportPointsIntervalUnits pointsIntervalUnitsFunctions = m_modelExportAfter->pointsIntervalUnitsRelations();
  ExportPointsIntervalUnits pointsIntervalUnitsRelations = m_modelExportAfter->pointsIntervalUnitsRelations();
  int indexFunctions = m_cmbRelationsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsFunctions));
  int indexRelations = m_cmbRelationsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsRelations));
  m_cmbFunctionsPointsEvenlySpacingUnits->setCurrentIndex (indexFunctions);
  m_cmbRelationsPointsEvenlySpacingUnits->setCurrentIndex (indexRelations);

  initializeIntervalConstraints ();

  updateControls();
  updateIntervalConstraints();
  enableOk (false); // Disable Ok button since there not yet any changes
  updatePreview();
}
Example #11
0
static inline void render1(void)
{
	scanKeys();
	
	// cpuEndSlice();
	playerControls(NULL);
	updateControls();
	// iprintf("controls : %d  \n",cpuEndSlice());
	
		updatePlayer(NULL);
	// iprintf("player : %d  \n",cpuEndSlice());
	
		updatePortals();
		updateTurrets();
		updateBigButtons();
		updateTimedButtons();
		updateEnergyDevices();
		updateEnergyBalls();
		updatePlatforms();
		updateCubeDispensers();
		updateEmancipators();
		updateEmancipationGrids();
		updateDoors();
		updateWallDoors();
	// iprintf("updates : %d  \n",cpuEndSlice());
	
	// if(currentPortal)GFX_CLEAR_COLOR=currentPortal->color|(31<<16);
	// else GFX_CLEAR_COLOR=0;
	u16 color=getCurrentPortalColor(getPlayer()->object->position);
	// NOGBA("col %d",color);
	// GFX_CLEAR_COLOR=color|(31<<16);
	GFX_CLEAR_COLOR=RGB15(0,0,0)|(31<<16);
	
	#ifdef DEBUG_GAME
		if(fifoCheckValue32(FIFO_USER_08))iprintf("\x1b[0J");
		while(fifoCheckValue32(FIFO_USER_08)){int32 cnt=fifoGetValue32(FIFO_USER_08);iprintf("ALERT %d      \n",cnt);NOGBA("ALERT %d      \n",cnt);}
	#else
		while(fifoCheckValue32(FIFO_USER_08)){int32 cnt=fifoGetValue32(FIFO_USER_08);NOGBA("ALERT %d      \n",cnt);}
	#endif
	
	projectCamera(NULL);

	glPushMatrix();
		
		glScalef32(SCALEFACT,SCALEFACT,SCALEFACT);
		
		renderGun(NULL);
		
		transformCamera(NULL);
		
		cpuEndSlice();
			// drawRoomsGame(128, color);
			drawRoomsGame(0, color);
			// drawCell(getCurrentCell(getPlayer()->currentRoom,getPlayerCamera()->position));
		// iprintf("room : %d  \n",cpuEndSlice());
		
		updateParticles();
		drawParticles();
		// iprintf("particles : %d  \n",cpuEndSlice());
		
			drawOBBs();
		// iprintf("OBBs : %d  \n",cpuEndSlice());
			drawBigButtons();
			drawTimedButtons();
			drawEnergyDevices();
			drawEnergyBalls();
			drawPlatforms();
			drawCubeDispensers();
			drawTurretsStuff();
			drawEmancipators();
			drawEmancipationGrids();
			drawDoors();
			drawWallDoors(NULL);
			drawSludge(&gameRoom);
		// iprintf("stuff : %d  \n",cpuEndSlice());
		
		drawPortal(&portal1);
		drawPortal(&portal2);
			
	glPopMatrix(1);

	//HUD TEST
	if(levelInfoCounter>0 && (levelTitle || levelAuthor))
	{
		levelInfoCounter--;
		glMatrixMode(GL_PROJECTION);
		glPushMatrix();
			glLoadIdentity();
			glOrthof32(inttof32(0), inttof32(255), inttof32(191), inttof32(0), -inttof32(1), inttof32(1));
			
			glMatrixMode(GL_MODELVIEW);
			glPushMatrix();
				glLoadIdentity();

				if(levelTitle)drawCenteredString(levelTitle, inttof32(17)/10, (82));
				if(levelAuthor)drawCenteredString(levelAuthor, inttof32(1), (100));

			glPopMatrix(1);
			glMatrixMode(GL_PROJECTION);
		glPopMatrix(1);
	}
	
	glFlush(0);
}
Example #12
0
void PlayerWidget::updateState(SongMsgId playing, AudioPlayerState playingState, int64 playingPosition, int64 playingDuration, int32 playingFrequency) {
	if (!playing) {
		audioPlayer()->currentState(&playing, &playingState, &playingPosition, &playingDuration, &playingFrequency);
	}

	bool songChanged = false;
	if (playing && _song != playing) {
		songChanged = true;
		_song = playing;
		if (HistoryItem *item = App::histItemById(_song.msgId)) {
			_history = item->history();
			findCurrent();
		} else {
			_history = 0;
			_index = -1;
		}
		SongData *song = _song.song->song();
		if (song->performer.isEmpty()) {
			_name.setText(st::linkFont, song->title.isEmpty() ? (_song.song->name.isEmpty() ? qsl("Unknown Track") : _song.song->name) : song->title, _textNameOptions);
		} else {
			TextCustomTagsMap custom;
			custom.insert(QChar('c'), qMakePair(textcmdStartLink(1), textcmdStopLink()));
			_name.setRichText(st::linkFont, QString::fromUtf8("[c]%1[/c] \xe2\x80\x93 %2").arg(textRichPrepare(song->performer)).arg(song->title.isEmpty() ? qsl("Unknown Track") : textRichPrepare(song->title)), _textNameOptions, custom);
		}
		updateControls();
	}

	qint64 position = 0, duration = 0, display = 0;
	if (playing == _song) {
		if (!(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) {
			display = position = playingPosition;
			duration = playingDuration;
		} else {
			display = playingDuration;
		}
		display = display / (playingFrequency ? playingFrequency : AudioVoiceMsgFrequency);
	} else if (_song) {
		display = _song.song->song()->duration;
	}
	bool showPause = false, stopped = ((playingState & AudioPlayerStoppedMask) || playingState == AudioPlayerFinishing);
	bool wasPlaying = !!_duration;
	if (!stopped) {
		showPause = (playingState == AudioPlayerPlaying || playingState == AudioPlayerResuming || playingState == AudioPlayerStarting);
	}
	QString time;
	float64 progress = 0.;
	int32 loaded;
	float64 loadProgress = 1.;
	if (duration || !_song.song->loader) {
		time = (_down == OverPlayback) ? _time : formatDurationText(display);
		progress = duration ? snap(float64(position) / duration, 0., 1.) : 0.;
		loaded = duration ? _song.song->size : 0;
	} else {
		loaded = _song.song->loader ? _song.song->loader->currentOffset() : 0;
		time = formatDownloadText(loaded, _song.song->size);
		loadProgress = snap(float64(loaded) / qMax(_song.song->size, 1), 0., 1.);
	}
	if (time != _time || showPause != _showPause) {
		if (_time != time) {
			_time = time;
			_timeWidth = st::linkFont->m.width(_time);
		}
		_showPause = showPause;
		if (duration != _duration || position != _position || loaded != _loaded) {
			if (!songChanged && ((!stopped && duration && _duration) || (!duration && _loaded != loaded))) {
				a_progress.start(progress);
				a_loadProgress.start(loadProgress);
				_progressAnim.start();
			} else {
				a_progress = anim::fvalue(progress, progress);
				a_loadProgress = anim::fvalue(loadProgress, loadProgress);
				_progressAnim.stop();
			}
			_position = position;
			_duration = duration;
			_loaded = loaded;
		}
		update();
	} else if (duration != _duration || position != _position || loaded != _loaded) {
		if (!songChanged && ((!stopped && duration && _duration) || (!duration && _loaded != loaded))) {
			a_progress.start(progress);
			a_loadProgress.start(loadProgress);
			_progressAnim.start();
		} else {
			a_progress = anim::fvalue(progress, progress);
			a_loadProgress = anim::fvalue(loadProgress, loadProgress);
			_progressAnim.stop();
		}
		_position = position;
		_duration = duration;
		_loaded = loaded;
	}

	if (wasPlaying && playingState == AudioPlayerStoppedAtEnd) {
		if (_repeat) {
			startPlay(_song.msgId);
		} else {
			nextPressed();
		}
	}

	if (songChanged) {
		emit playerSongChanged(_song.msgId);
	}
}
void SnapGuideConfigWidget::showEvent(QShowEvent * event)
{
    Q_UNUSED(event);
    updateControls();
}
QgsRasterFormatSaveOptionsWidget::QgsRasterFormatSaveOptionsWidget( QWidget* parent, QString format,
    QgsRasterFormatSaveOptionsWidget::Type type, QString provider )
    : QWidget( parent ), mFormat( format ), mProvider( provider ), mRasterLayer( 0 ),
    mRasterFileName( QString() ), mPyramids( false ),
    mPyramidsFormat( QgsRaster::PyramidsGTiff )

{
  setupUi( this );

  setType( type );

  if ( mBuiltinProfiles.isEmpty() )
  {
    // key=profileKey values=format,profileName,options
    mBuiltinProfiles[ "z_adefault" ] = ( QStringList() << "" << tr( "Default" ) << "" );

    // these GTiff profiles are based on Tim's benchmarks at
    // http://linfiniti.com/2011/05/gdal-efficiency-of-various-compression-algorithms/
    // big: no compression | medium: reasonable size/speed tradeoff | small: smallest size
    mBuiltinProfiles[ "z_gtiff_1big" ] =
      ( QStringList() << "GTiff" << tr( "No compression" )
        << "COMPRESS=NONE BIGTIFF=IF_NEEDED" );
    mBuiltinProfiles[ "z_gtiff_2medium" ] =
      ( QStringList() << "GTiff" << tr( "Low compression" )
        << "COMPRESS=PACKBITS" );
    mBuiltinProfiles[ "z_gtiff_3small" ] =
      ( QStringList() << "GTiff" << tr( "High compression" )
        << "COMPRESS=DEFLATE PREDICTOR=2 ZLEVEL=9" );
    mBuiltinProfiles[ "z_gtiff_4jpeg" ] =
      ( QStringList() << "GTiff" << tr( "JPEG compression" )
        << "COMPRESS=JPEG JPEG_QUALITY=75" );

    // overview compression schemes for GTiff format, see
    // http://www.gdal.org/gdaladdo.html and http://www.gdal.org/frmt_gtiff.html
    // TODO - should we offer GDAL_TIFF_OVR_BLOCKSIZE option here or in QgsRasterPyramidsOptionsWidget ?
    mBuiltinProfiles[ "z__pyramids_gtiff_1big" ] =
      ( QStringList() << "_pyramids" << tr( "No compression" )
        << "COMPRESS_OVERVIEW=NONE BIGTIFF_OVERVIEW=IF_NEEDED" );
    mBuiltinProfiles[ "z__pyramids_gtiff_2medium" ] =
      ( QStringList() << "_pyramids" << tr( "Low compression" )
        << "COMPRESS_OVERVIEW=PACKBITS" );
    mBuiltinProfiles[ "z__pyramids_gtiff_3small" ] =
      ( QStringList() << "_pyramids" << tr( "High compression" )
        << "COMPRESS_OVERVIEW=DEFLATE PREDICTOR_OVERVIEW=2 ZLEVEL=9" ); // how to set zlevel?
    mBuiltinProfiles[ "z__pyramids_gtiff_4jpeg" ] =
      ( QStringList() << "_pyramids" << tr( "JPEG compression" )
        << "JPEG_QUALITY_OVERVIEW=75 COMPRESS_OVERVIEW=JPEG PHOTOMETRIC_OVERVIEW=YCBCR INTERLEAVE_OVERVIEW=PIXEL" );
  }

  connect( mProfileComboBox, SIGNAL( currentIndexChanged( const QString & ) ),
           this, SLOT( updateOptions() ) );
  connect( mOptionsTable, SIGNAL( cellChanged( int, int ) ), this, SLOT( optionsTableChanged() ) );
  connect( mOptionsHelpButton, SIGNAL( clicked() ), this, SLOT( helpOptions() ) );
  connect( mOptionsValidateButton, SIGNAL( clicked() ), this, SLOT( validateOptions() ) );

  // create eventFilter to map right click to swapOptionsUI()
  // mOptionsLabel->installEventFilter( this );
  mOptionsLineEdit->installEventFilter( this );
  mOptionsStackedWidget->installEventFilter( this );

  updateControls();
  updateProfiles();

  QgsDebugMsg( "done" );
}
// Initialize the dialog widgets and connect the signals/slots
void ObservabilityDialog::createDialogContent()
{
	ui->setupUi(dialog);
	ui->tabs->setCurrentIndex(0);
	connect(&StelApp::getInstance(),
	        SIGNAL(languageChanged()), this, SLOT(retranslate()));

	Observability* plugin = GETSTELMODULE(Observability);

#ifdef Q_OS_WIN
	//Kinetic scrolling for tablet pc and pc
	QList<QWidget *> addscroll;
	addscroll << ui->aboutTextBrowser;
	installKineticScrolling(addscroll);
#endif

	// Settings:
	
	// clicked() is called only when the user makes an input,
	// so we avoid an endless loop when setting the value in updateControls().
	connect(ui->todayCheckBox, SIGNAL(clicked(bool)),
	        plugin, SLOT(enableTodayField(bool)));
	connect(ui->acroCosCheckBox, SIGNAL(clicked(bool)),
	        plugin, SLOT(enableAcroCosField(bool)));
	connect(ui->oppositionCheckBox, SIGNAL(clicked(bool)),
	        plugin, SLOT(enableOppositionField(bool)));
	connect(ui->goodNightsCheckBox, SIGNAL(clicked(bool)),
	        plugin, SLOT(enableGoodNightsField(bool)));
	connect(ui->fullMoonCheckBox, SIGNAL(clicked(bool)),
	        plugin, SLOT(enableFullMoonField(bool)));

	connect(ui->redSlider, SIGNAL(sliderMoved(int)),
	        this, SLOT(setColor()));
	connect(ui->greenSlider, SIGNAL(sliderMoved(int)),
	        this, SLOT(setColor()));
	connect(ui->blueSlider, SIGNAL(sliderMoved(int)),
	        this, SLOT(setColor()));
	
	// Isn't valueChanged() better? But then we'll have to block
	// signlas when settting the slider values.
	connect(ui->fontSize, SIGNAL(sliderMoved(int)),
	        plugin, SLOT(setFontSize(int)));
	connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)),
	        plugin, SLOT(setTwilightAltitude(int)));
	connect(ui->sunAltitudeSlider, SIGNAL(sliderMoved(int)),
	        this, SLOT(updateAltitudeLabel(int)));
	connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)),
	        plugin, SLOT(setHorizonAltitude(int)));
	connect(ui->horizonAltitudeSlider, SIGNAL(sliderMoved(int)),
	        this, SLOT(updateHorizonLabel(int)));

	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));
	connect(ui->restoreDefaultsButton, SIGNAL(clicked()),
	        plugin, SLOT(resetConfiguration()));
	// TODO: The plug-in should emit a signal when settings are changed.
	// This works, because slots are called in the order they were connected.
	connect(ui->restoreDefaultsButton, SIGNAL(clicked()),
	        this, SLOT(updateControls()));
	connect(ui->saveSettingsButton, SIGNAL(clicked()),
	        plugin, SLOT(saveConfiguration()));

	// About tab
	setAboutHtml();
	StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
	if(gui!=NULL)
		ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui->getStelStyle().htmlStyleSheet));

	updateControls();
}
 void FaceAttribsEditor::brushFacesDidChange(const Model::BrushFaceList& faces) {
     MapDocumentSPtr document = lock(m_document);
     m_faces = document->allSelectedBrushFaces();
     updateControls();
 }
Example #17
0
LRESULT CommandDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// Translate
	SetWindowText(CTSTRING(USER_CMD_WINDOW));
	
	ATTACH(IDC_RESULT, ctrlResult);
	ATTACH(IDC_NAME, ctrlName);
	ATTACH(IDC_HUB, ctrlHub);
	ATTACH(IDC_SETTINGS_SEPARATOR, ctrlSeparator);
	ATTACH(IDC_SETTINGS_RAW, ctrlRaw);
	ATTACH(IDC_SETTINGS_CHAT, ctrlChat);
	ATTACH(IDC_SETTINGS_PM, ctrlPM);
	ATTACH(IDC_SETTINGS_ONCE, ctrlOnce);
	ATTACH(IDC_SETTINGS_HUB_MENU, ctrlHubMenu);
	ATTACH(IDC_SETTINGS_USER_MENU, ctrlUserMenu);
	ATTACH(IDC_SETTINGS_SEARCH_MENU, ctrlSearchMenu);
	ATTACH(IDC_SETTINGS_FILELIST_MENU, ctrlFilelistMenu);
	ATTACH(IDC_NICK, ctrlNick);
	ATTACH(IDC_COMMAND, ctrlCommand);
	
	WinUtil::translate(*this, texts);
	
	if (type == UserCommand::TYPE_SEPARATOR)
	{
		ctrlSeparator.SetCheck(BST_CHECKED);
	}
	else
	{
		// More difficult, determine type by what it seems to be...
		if ((_tcsncmp(command.c_str(), _T("$To: "), 5) == 0) &&
		        (command.find(_T(" From: %[myNI] $<%[myNI]> ")) != string::npos ||
		         command.find(_T(" From: %[mynick] $<%[mynick]> ")) != string::npos) &&
		        command.find(_T('|')) == command.length() - 1) // if it has | anywhere but the end, it is raw
		{
			string::size_type i = command.find(_T(' '), 5);
			dcassert(i != string::npos);
			tstring to = command.substr(5, i - 5);
			string::size_type cmd_pos = command.find(_T('>'), 5) + 2;
			tstring cmd = Text::toT(NmdcHub::validateMessage(Text::fromT(command.substr(cmd_pos, command.length() - cmd_pos - 1)), true));
			ctrlPM.SetCheck(BST_CHECKED);
			ctrlNick.SetWindowText(to.c_str());
			ctrlCommand.SetWindowText(cmd.c_str());
		}
		else if (((_tcsncmp(command.c_str(), _T("<%[mynick]> "), 12) == 0) ||
		          (_tcsncmp(command.c_str(), _T("<%[myNI]> "), 10) == 0)) &&
		         command[command.length() - 1] == '|')
		{
			// Looks like a chat thing...
			string::size_type cmd_pos = command.find(_T('>')) + 2;
			tstring cmd = Text::toT(NmdcHub::validateMessage(Text::fromT(command.substr(cmd_pos, command.length() - cmd_pos - 1)), true));
			ctrlChat.SetCheck(BST_CHECKED);
			ctrlCommand.SetWindowText(cmd.c_str());
		}
		else
		{
			tstring cmd = command;
			ctrlRaw.SetCheck(BST_CHECKED);
			ctrlCommand.SetWindowText(cmd.c_str());
		}
		if (type == UserCommand::TYPE_RAW_ONCE)
		{
			ctrlOnce.SetCheck(BST_CHECKED);
			type = 1;
		}
	}
	
	ctrlHub.SetWindowText(hub.c_str());
	ctrlName.SetWindowText(name.c_str());
	
	if (ctx & UserCommand::CONTEXT_HUB)
		ctrlHubMenu.SetCheck(BST_CHECKED);
	if (ctx & UserCommand::CONTEXT_USER)
		ctrlUserMenu.SetCheck(BST_CHECKED);
	if (ctx & UserCommand::CONTEXT_SEARCH)
		ctrlSearchMenu.SetCheck(BST_CHECKED);
	if (ctx & UserCommand::CONTEXT_FILELIST)
		ctrlFilelistMenu.SetCheck(BST_CHECKED);
		
	updateControls();
	updateCommand();
	ctrlResult.SetWindowText(command.c_str());
	
	ctrlSeparator.SetFocus();
	
	CenterWindow(GetParent());
	return FALSE;
}
 void FaceAttribsEditor::selectionDidChange(const Selection& selection) {
     MapDocumentSPtr document = lock(m_document);
     m_faces = document->allSelectedBrushFaces();
     updateControls();
 }
Example #19
0
void LLFloaterLagMeter::onClickShrink()  // toggle "LagMeterShrunk"
{
	bool shrunk = isShrunk();
	updateControls(!shrunk);
	gSavedSettings.setBOOL("LagMeterShrunk", !shrunk);
}
 void FaceAttribsEditor::textureCollectionsDidChange() {
     updateControls();
 }
void FieldPropertiesDialog::update()
{
    updateControls();
}
Example #22
0
void ClubEditor::revertClub()
{
    updateControls();
}
Example #23
0
void CommandDlg::handleTypeChanged() {
	updateType();
	updateCommand();
	updateControls();
}
Example #24
0
void ClubEditor::editClub(Club *club)
{
    m_club = club;

    updateControls();
}
void mmStockDialog::OnSave(wxCommandEvent& /*event*/)
{
    if (priceListBox_->GetItemCount())
    {
        for (long i=0; i<priceListBox_->GetItemCount(); i++)
        {
            if (priceListBox_->GetItemState(0, wxLIST_STATE_SELECTED) == wxLIST_STATE_SELECTED)
            {
                priceListBox_->SetItemState(0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
                break;
            }
        }
    }

    Model_Account::Data* account = Model_Account::instance().get(accountID_);
    if (!account)
    {
        mmShowErrorMessageInvalid(this, _("Held At"));
        return;
    }
    
    const wxString& stockSymbol = stockSymbol_->GetValue();
    if (stockSymbol.empty()) {
        mmShowErrorMessageInvalid(this, _("Symbol"));
        return;
    }
        
    Model_Currency::Data *currency = Model_Account::currency(account);
    const wxString& pdate = dpc_->GetValue().FormatISODate();
    const wxString& stockName = stockName_->GetValue();
    const wxString& notes = notes_->GetValue();

    double numShares = 0;
    if (!numShares_->checkValue(numShares, currency))
        return;

    double pPrice;
    if (!purchasePrice_->checkValue(pPrice, currency))
        return;

    double cPrice;
    if (!currentPrice_->GetDouble(cPrice, currency))
    {
        // we assume current price = purchase price
        cPrice = pPrice;
    }

    double commission = 0;
    commission_->GetDouble(commission);

    double cValue = cPrice * numShares; //TODO: what about commision?

    if (!m_stock) m_stock = Model_Stock::instance().create();

    m_stock->HELDAT = accountID_;
    m_stock->PURCHASEDATE = pdate;
    m_stock->STOCKNAME = stockName;
    m_stock->SYMBOL = stockSymbol;
    m_stock->NUMSHARES = numShares;
    m_stock->PURCHASEPRICE = pPrice;
    m_stock->NOTES = notes;
    m_stock->CURRENTPRICE = cPrice;
    m_stock->VALUE = cValue;
    m_stock->COMMISSION = commission;
    if (edit_) m_stock->STOCKID = stockID_;

    stockID_ = Model_Stock::instance().save(m_stock);

    if (!edit_)
    {
        const wxString& RefType = Model_Attachment::reftype_desc(Model_Attachment::STOCK);
        mmAttachmentManage::RelocateAllAttachments(RefType, 0, m_stock->STOCKID);
    }

    // update stock history table and stock items price/values with same symbol code
    if (!m_stock->SYMBOL.IsEmpty())
    {
        for (auto st : Model_Stock::instance().find(Model_Stock::SYMBOL(m_stock->SYMBOL)))
        {
            if (st.STOCKID != m_stock->STOCKID)
            {
                st.CURRENTPRICE = m_stock->CURRENTPRICE;
                st.VALUE = st.CURRENTPRICE * st.NUMSHARES;
                Model_Stock::instance().save(&st);
            }
            Model_StockHistory::instance().addUpdate(st.SYMBOL, priceDate_->GetValue(), st.CURRENTPRICE, Model_StockHistory::MANUAL);
        }
    }

    edit_ = true;
    updateControls();
}
void LocalStorageBox::onTempDirClearFailed(int task) {
	if (task & Local::ClearManagerStorage) {
		_state = State::ClearFailed;
	}
	updateControls();
}
Example #27
0
LRESULT CommandDlg::onType(WORD , WORD, HWND , BOOL& ) {
    updateType();
    updateCommand();
    updateControls();
    return 0;
}
BOOL LLPanelNearByMedia::postBuild()
{
	LLPanel::postBuild();

	const S32 RESIZE_BAR_THICKNESS = 6;
	LLResizeBar::Params p;
	p.rect = LLRect(0, RESIZE_BAR_THICKNESS, getRect().getWidth(), 0);
	p.name = "resizebar_bottom";
	p.min_size = getRect().getHeight();
	p.side = LLResizeBar::BOTTOM;
	p.resizing_view = this;
	addChild( LLUICtrlFactory::create<LLResizeBar>(p) );

	p.rect = LLRect( 0, getRect().getHeight(), RESIZE_BAR_THICKNESS, 0);
	p.name = "resizebar_left";
	p.min_size = getRect().getWidth();
	p.side = LLResizeBar::LEFT;
	addChild( LLUICtrlFactory::create<LLResizeBar>(p) );
	
	LLResizeHandle::Params resize_handle_p;
	resize_handle_p.rect = LLRect( 0, RESIZE_HANDLE_HEIGHT, RESIZE_HANDLE_WIDTH, 0 );
	resize_handle_p.mouse_opaque(false);
	resize_handle_p.min_width(getRect().getWidth());
	resize_handle_p.min_height(getRect().getHeight());
	resize_handle_p.corner(LLResizeHandle::LEFT_BOTTOM);
	addChild(LLUICtrlFactory::create<LLResizeHandle>(resize_handle_p));

	mNearbyMediaPanel = getChild<LLUICtrl>("nearby_media_panel");
	mMediaList = getChild<LLScrollListCtrl>("media_list");
	mEnableAllCtrl = getChild<LLUICtrl>("all_nearby_media_enable_btn");
	mDisableAllCtrl = getChild<LLUICtrl>("all_nearby_media_disable_btn");
	mShowCtrl = getChild<LLComboBox>("show_combo");

	// Dynamic (selection-dependent) controls
	mStopCtrl = getChild<LLUICtrl>("stop");
	mPlayCtrl = getChild<LLUICtrl>("play");
	mPauseCtrl = getChild<LLUICtrl>("pause");
	mMuteCtrl = getChild<LLUICtrl>("mute");
	mVolumeSliderCtrl = getChild<LLUICtrl>("volume_slider_ctrl");
	mZoomCtrl = getChild<LLUICtrl>("zoom");
	mUnzoomCtrl = getChild<LLUICtrl>("unzoom");
	mVolumeSlider = getChild<LLSlider>("volume_slider");
	mMuteBtn = getChild<LLButton>("mute_btn");
	
	mEmptyNameString = getString("empty_item_text");
	mParcelMediaName = getString("parcel_media_name");
	mParcelAudioName = getString("parcel_audio_name");
	mPlayingString = getString("playing_suffix");
	
	mMediaList->setDoubleClickCallback(onZoomMedia, this);
	mMediaList->sortByColumnIndex(PROXIMITY_COLUMN, TRUE);
	mMediaList->sortByColumnIndex(VISIBILITY_COLUMN, FALSE);
	
	refreshList();
	updateControls();
	updateColumns();
	
	LLView* minimized_controls = getChildView("minimized_controls");
	mMoreRect = getRect();
	mLessRect = getRect();
	mLessRect.mBottom = minimized_controls->getRect().mBottom;

	getChild<LLUICtrl>("more_btn")->setVisible(false);
	onMoreLess();
	
	return TRUE;
}
Example #29
0
void LocalStorageBox::onClear() {
	App::wnd()->tempDirDelete(Local::ClearManagerStorage);
	_state = State::Clearing;
	updateControls();
}
void QgsRasterFormatSaveOptionsWidget::setFormat( QString format )
{
  mFormat = format;
  updateControls();
  updateProfiles();
}