示例#1
0
cceMaterialShaderEditorDialog::cceMaterialShaderEditorDialog(QWidget *parent)
  : cceMaterialEditorAbstract (parent)
  , _shader (0)
{
  _gui.setupUi(this);

  _textEditor = new GLSLTextEditor (_gui.frameContent);
  QGridLayout *layout = new QGridLayout (_gui.frameContent);
  layout->setContentsMargins(0, 0, 0, 0);\
  layout->addWidget(_textEditor);

  _proxyShader = new cceMaterialShader ();
  _bindingModel = new cceMaterialShaderBindingTreeModel (this, _proxyShader);
  _gui.treeView->setModel(_bindingModel);

  _gui.splitter->setStretchFactor(0, 1);
  _gui.splitter->setStretchFactor(1, 0);

  _gui.comboBoxType->clear();
  for (unsigned i=0; i<cceMaterialShader::Type_COUNT; ++i)
    {
      _gui.comboBoxType->addItem(cceMaterialShader::GetTypeName((cceMaterialShader::Type)i));
    }

  connect (_textEditor, SIGNAL (textChanged ()), this, SLOT (CodeChanged ()));

  _updateBindingTime.setInterval(500);
  _updateBindingTime.setSingleShot(true);
  connect (&_updateBindingTime, SIGNAL(timeout()), this, SLOT(UpdateBindings()));

}
void CACTController::OnRefreshSurface(DWORD fdwRefresh)
{
	s_lRefresh++;

	if ( s_lRefresh % 2 != 0 )
		return;

	if (fdwRefresh != REFRESH_F_MIXER)
		TRACE("CACTController::OnRefreshSurface(%lu)\n", fdwRefresh);

	if (m_bSelectHighlightsTrack && m_eStripType == MIX_STRIP_TRACK)
		LimitAndSetSelectedTrack(GetParamSelected());

	DWORD dwNumTracks = GetStripCount(MIX_STRIP_TRACK);
	DWORD dwNumBuses  = GetStripCount(MIX_STRIP_BUS);
	DWORD dwNumMains  = GetStripCount(MIX_STRIP_MASTER);

	if (dwNumTracks != m_dwNumTracks ||
		dwNumBuses  != m_dwNumBuses  ||
		dwNumMains  != m_dwNumMains)
	{
		ShiftStripNum(0, true);
		ShiftSelectedTrack(0, true);
	}
	else if (fdwRefresh & (REFRESH_F_TOPOLOGY | REFRESH_F_PLUGIN))
		UpdateBindings();

	SONAR_UI_CONTEXT uiContext = GetCurrentContext();
	if (uiContext != m_uiContext)
	{
		m_uiContext = uiContext;

		if (m_bUseDynamicMappings && m_bACTFollowsContext)
			UpdateBindings();
	}

	UpdateToolbarText();

	m_dwNumTracks = dwNumTracks;
	m_dwNumBuses  = dwNumBuses;
	m_dwNumMains  = dwNumMains;
}
示例#3
0
void __fastcall TfrmMain::FormCreate(TObject *Sender)
{
//Initalize our clients list
  Clients = new TList;
//Call updatebindings so that the servers bindings are correct
  UpdateBindings();
//Get the local DNS entry for this computer
  lblDNS->Caption = tcpServer->LocalName;
//Display the current version of indy running on the system
  lblSocketVer->Caption = tcpServer->Version;
  //set form caption
  this->Caption="Indy Powered Chat Server";

}
示例#4
0
void InitBindings()
{
	UpdateBindings();
	Pi::config->Save();
}
示例#5
0
void __fastcall TfrmMain::seBinding1Change(TObject *Sender)
{
  UpdateBindings();
}