当前位置: 首页>>代码示例>>C++>>正文


C++ Updated函数代码示例

本文整理汇总了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();
}
开发者ID:dot-Sean,项目名称:audio,代码行数:29,代码来源:ToolDock.cpp

示例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);
}
开发者ID:Panzerschrek,项目名称:FREG,代码行数:33,代码来源:VirtScreen.cpp

示例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();
}
开发者ID:GYGit,项目名称:Audacity,代码行数:33,代码来源:MixerToolBar.cpp

示例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();
   }
}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:25,代码来源:ControlToolBar.cpp

示例5: Updated

TextureSource*
DIBTextureHost::GetTextureSources()
{
  if (!mTextureSource) {
    Updated();
  }

  return mTextureSource;
}
开发者ID:AOSC-Dev,项目名称:Pale-Moon,代码行数:9,代码来源:TextureDIB.cpp

示例6: Updated

bool
DIBTextureHost::BindTextureSource(CompositableTextureSourceRef& aTexture)
{
  if (!mTextureSource) {
    Updated();
  }

  aTexture = mTextureSource;
  return !!aTexture;
}
开发者ID:AtulKumar2,项目名称:gecko-dev,代码行数:10,代码来源:TextureDIB.cpp

示例7: Updated

bool
TextureHostDirectUpload::BindTextureSource(CompositableTextureSourceRef& aTexture)
{
  if (!mTextureSource) {
    Updated();
  }

  aTexture = mTextureSource;
  return !!aTexture;
}
开发者ID:Wafflespeanut,项目名称:gecko-dev,代码行数:10,代码来源:TextureDIB.cpp

示例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();
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:55,代码来源:SelectionBar.cpp

示例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();
} 
开发者ID:tuanmasterit,项目名称:audacity,代码行数:55,代码来源:ToolManager.cpp

示例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();
      }
   }
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:42,代码来源:TimeTextCtrl.cpp

示例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
}
开发者ID:dulton,项目名称:53_hero,代码行数:11,代码来源:tUsbPortManager.cpp

示例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 );
}
开发者ID:GYGit,项目名称:Audacity,代码行数:57,代码来源:ToolManager.cpp

示例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;
    }
开发者ID:Panzerschrek,项目名称:FREG-3d_2.0,代码行数:12,代码来源:Animal.cpp

示例14: Updated

void TrackingUser::Update()
{
    if(!device_ || !tracking_)
        return;

    if(device_->userGenerator_.GetSkeletonCap().IsTracking(id_))
    {
        if(skeleton_->Update())
            emit Updated(id_, skeleton_);
    }
}
开发者ID:Adminotech,项目名称:meshmoon-plugins,代码行数:11,代码来源:TrackingUser.cpp

示例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();
}
开发者ID:Grunji,项目名称:audacity,代码行数:53,代码来源:SelectionBar.cpp


注:本文中的Updated函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。