本文整理汇总了C++中Updated函数的典型用法代码示例。如果您正苦于以下问题:C++ Updated函数的具体用法?C++ Updated怎么用?C++ Updated使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Updated函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LayoutToolBars
//
// Handle ToolDock events
//
void ToolDock::Dock( ToolBar *bar, int before )
{
// Adopt the toolbar into our family
bar->Reparent( this );
mBars[ bar->GetId() ] = bar;
// Reset height
bar->SetSize( bar->GetSize().x, bar->GetDockedSize().y );
// Park the new bar in the correct berth
if( before >= 0 && before < (int)mDockedBars.GetCount() )
{
mDockedBars.Insert( bar, before );
}
else
{
mDockedBars.Add( bar );
}
// Inform toolbar of change
bar->SetDocked( this, false );
// Rearrange our world
LayoutToolBars();
Updated();
}
示例2: w
VirtScreen::VirtScreen(World * const world_, Player * const player_) :
w(world_),
player(player_)
{
connect(w, SIGNAL(Notify(const QString &)),
this, SLOT(Notify(const QString &)));
connect(player, SIGNAL(Notify(const QString &)),
this, SLOT(Notify(const QString &)));
connect(w, SIGNAL(GetString(QString &)),
this, SLOT(PassString(QString &)),
Qt::DirectConnection);
connect(player, SIGNAL(GetString(QString &)),
this, SLOT(PassString(QString &)),
Qt::DirectConnection);
connect(player, SIGNAL(Updated()),
this, SLOT(UpdatePlayer()),
Qt::DirectConnection);
connect(w, SIGNAL(ReConnect()),
this, SLOT(ConnectWorld()),
Qt::DirectConnection);
connect(w, SIGNAL(UpdatedAll()),
this, SLOT(UpdateAll()),
Qt::DirectConnection);
connect(w, SIGNAL(Moved(const int)),
this, SLOT(Move(const int)),
Qt::DirectConnection);
ConnectWorld();
connect(w, SIGNAL(UpdatesEnded()),
this, SLOT(UpdatesEnd()),
Qt::DirectConnection);
}
示例3: Layout
void MixerToolBar::UpdatePrefs()
{
#if USE_PORTMIXER
float inputVolume;
float playbackVolume;
int inputSource;
// Reset the selected source
gAudioIO->GetMixer(&inputSource, &inputVolume, &playbackVolume);
// Show or hide the input slider based on whether it works
mInputSlider->Enable(gAudioIO->InputMixerWorks());
// Layout the toolbar
Layout();
// Resize the toolbar to fit the contents
Fit();
// And make that size the minimum
SetMinSize( wxWindow::GetSizer()->GetMinSize() );
SetSize( GetMinSize() );
// Notify someone that we've changed our size
Updated();
#endif
// Set label to pull in language change
SetLabel(_("Mixer"));
// Give base class a chance
ToolBar::UpdatePrefs();
}
示例4: wxT
void ControlToolBar::UpdatePrefs()
{
bool updated = false;
bool active;
gPrefs->Read( wxT("/GUI/ErgonomicTransportButtons"), &active, true );
if( mErgonomicTransportButtons != active )
{
mErgonomicTransportButtons = active;
updated = true;
}
gPrefs->Read( wxT("/Batch/CleanSpeechMode"), &active, false );
if( mCleanSpeechMode != active )
{
mCleanSpeechMode = active;
updated = true;
}
if( updated )
{
ReCreateButtons();
Updated();
}
}
示例5: Updated
TextureSource*
DIBTextureHost::GetTextureSources()
{
if (!mTextureSource) {
Updated();
}
return mTextureSource;
}
示例6: Updated
bool
DIBTextureHost::BindTextureSource(CompositableTextureSourceRef& aTexture)
{
if (!mTextureSource) {
Updated();
}
aTexture = mTextureSource;
return !!aTexture;
}
示例7: Updated
bool
TextureHostDirectUpload::BindTextureSource(CompositableTextureSourceRef& aTexture)
{
if (!mTextureSource) {
Updated();
}
aTexture = mTextureSource;
return !!aTexture;
}
示例8: FindFocus
void SelectionBar::OnUpdate(wxCommandEvent &evt)
{
int index = evt.GetInt();
wxWindow *w = FindFocus();
bool leftFocus = (w == mLeftTime);
bool rightFocus = (w == mRightTime);
bool audioFocus = (w == mAudioTime);
evt.Skip(false);
/* we don't actually need a TimeTextCtrl, but need it's
* translations which are done at runtime */
TimeTextCtrl *ttc = new TimeTextCtrl(this, wxID_ANY, wxT(""), 0.0, mRate);
wxString formatName(ttc->GetBuiltinName(index));
gPrefs->Write(wxT("/SelectionFormat"), formatName);
gPrefs->Flush();
#if wxUSE_TOOLTIPS
mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), formatName.c_str()));
#endif
delete ttc;
// ToolBar::ReCreateButtons() will get rid of our sizers and controls
// so reset pointers first.
mLeftTime =
mRightTime =
mAudioTime = NULL;
mRightEndButton =
mRightLengthButton = NULL;
mRateBox = NULL;
mRateText = NULL;
ToolBar::ReCreateButtons();
ValuesToControls();
wxString formatString = mLeftTime->GetBuiltinFormat(index);
mLeftTime->SetFormatString(formatString);
mRightTime->SetFormatString(formatString);
mAudioTime->SetFormatString(formatString);
if (leftFocus) {
mLeftTime->SetFocus();
}
else if (rightFocus) {
mRightTime->SetFocus();
}
else if (audioFocus) {
mAudioTime->SetFocus();
}
Updated();
}
示例9: Expose
void ToolManager::Reset()
{
int ndx;
// Disconnect all docked bars
for( ndx = 0; ndx < ToolBarCount; ndx++ )
{
wxWindow *parent;
ToolDock *dock;
ToolBar *bar = mBars[ ndx ];
// Disconnect the bar
if( bar->IsDocked() )
{
bar->GetDock()->Undock( bar );
parent = NULL;
}
else
{
parent = bar->GetParent();
}
if( ndx == SelectionBarID )
{
dock = mBotDock;
wxCommandEvent e;
bar->GetEventHandler()->ProcessEvent(e);
}
else
{
dock = mTopDock;
bar->ReCreateButtons();
}
bar->EnableDisableButtons();
#if 0
if( bar->IsResizable() )
{
bar->SetSize(bar->GetBestFittingSize());
}
#endif
dock->Dock( bar );
Expose( ndx, ndx == DeviceBarID ? false : true );
if( parent )
{
parent->Destroy();
}
}
LayoutToolBars();
Updated();
}
示例10: OnContext
void TimeTextCtrl::OnMouse(wxMouseEvent &event)
{
if (event.LeftDown() && event.GetX() >= mWidth) {
wxContextMenuEvent e;
OnContext(e);
}
else if (event.LeftDown()) {
SetFocus();
int bestDist = 9999;
unsigned int i;
mFocusedDigit = 0;
for(i=0; i<mDigits.GetCount(); i++) {
int dist = abs(event.m_x - (mDigits[i].digitBox.x +
mDigits[i].digitBox.width/2));
if (dist < bestDist) {
mFocusedDigit = i;
bestDist = dist;
}
}
Refresh(false);
}
else if (event.RightDown() && mMenuEnabled) {
wxContextMenuEvent e;
OnContext(e);
}
else if( event.m_wheelRotation != 0 ) {
int steps = event.m_wheelRotation /
(event.m_wheelDelta > 0 ? event.m_wheelDelta : 120);
if (steps < 0) {
Decrease(-steps);
Updated();
}
else {
Increase(steps);
Updated();
}
}
}
示例11: QObject
tUsbPortManager::tUsbPortManager( size_t cpuCount, tHALIOInterface& rHal, tUsbPortSettings& rSettings, QObject* pParent )
: QObject( pParent )
, m_PortCount( rHal.GetUsbPortMux().size() ) // this allows to determine the number of port we can actually changed
, m_CpuCount( cpuCount )
, m_rHal( rHal )
, m_rSettings( rSettings )
{
Connect( &m_rSettings, SIGNAL( Updated() ), this, SLOT( OnSettingsChanged() ) );
Connect( &m_rHal, SIGNAL( UsbPortMuxChanged(std::vector<Hal::tCpuNumber> ) ), this, SLOT( OnPortMuxChanged() ) );
OnSettingsChanged(); // load current config
}
示例12: wxPoint
//
// Transition a toolbar from float to dragging
//
void ToolManager::OnGrabber( GrabberEvent & event )
{
// No need to propagate any further
event.Skip( false );
// Remember which bar we're dragging
mDragBar = mBars[ event.GetId() ];
// Calculate the drag offset
wxPoint mp = event.GetPosition();
mDragOffset = mp -
mDragBar->GetParent()->ClientToScreen( mDragBar->GetPosition() ) +
wxPoint( 1, 1 );
// Must set the bar afloat if it's currently docked
if( mDragBar->IsDocked() )
{
#if defined(__WXMAC__)
// Disable window animation
wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, 1 );
#endif
// Adjust the starting position
mp -= mDragOffset;
// Inform toolbar of change
mDragBar->SetDocked( NULL, true );
// Construct a new floater
mDragWindow = new ToolFrame( mParent, this, mDragBar, mp );
// Make sure the ferry is visible
mDragWindow->Show();
// Notify parent of change
Updated();
#if defined(__WXMAC__)
// Reinstate original transition
wxSystemOptions::SetOption( wxMAC_WINDOW_PLAIN_TRANSITION, mTransition );
#endif
}
else
{
mDragWindow = (ToolFrame *) mDragBar->GetParent();
}
// We want all mouse events from this point on
mParent->CaptureMouse();
// Start monitoring shift key changes
mLastState = wxGetKeyState( WXK_SHIFT );
mTimer.Start( 100 );
}
示例13: Damage
// Animal:: section
inner_actions Animal::ActInner() {
if ( GROUP_MEAT != GetSubGroup(Sub()) ) return INNER_ACTION_NONE;
if ( satiation <= 0 ) {
Damage(5, DAMAGE_HUNGER);
} else {
--satiation;
Mend(1);
}
emit Updated();
return INNER_ACTION_NONE;
}
示例14: Updated
void TrackingUser::Update()
{
if(!device_ || !tracking_)
return;
if(device_->userGenerator_.GetSkeletonCap().IsTracking(id_))
{
if(skeleton_->Update())
emit Updated(id_, skeleton_);
}
}
示例15: FindFocus
void SelectionBar::OnUpdate(wxCommandEvent &evt)
{
int index = evt.GetInt();
wxWindow *w = FindFocus();
bool leftFocus = (w == mLeftTime);
bool rightFocus = (w == mRightTime);
bool audioFocus = (w == mAudioTime);
evt.Skip(false);
wxString format;
// Save format name before recreating the controls so they resize properly
format = mLeftTime->GetBuiltinName(index);
mListener->AS_SetSelectionFormat(format);
#if wxUSE_TOOLTIPS
mSnapTo->SetToolTip(wxString::Format(_("Snap Clicks/Selections to %s"), format.c_str()));
#endif
// ToolBar::ReCreateButtons() will get rid of our sizers and controls
// so reset pointers first.
mLeftTime =
mRightTime =
mAudioTime = NULL;
mRightEndButton =
mRightLengthButton = NULL;
mRateBox = NULL;
mRateText = NULL;
ToolBar::ReCreateButtons();
ValuesToControls();
format = mLeftTime->GetBuiltinFormat(index);
mLeftTime->SetFormatString(format);
mRightTime->SetFormatString(format);
mAudioTime->SetFormatString(format);
if (leftFocus) {
mLeftTime->SetFocus();
}
else if (rightFocus) {
mRightTime->SetFocus();
}
else if (audioFocus) {
mAudioTime->SetFocus();
}
Updated();
}