當前位置: 首頁>>代碼示例>>C++>>正文


C++ Changed函數代碼示例

本文整理匯總了C++中Changed函數的典型用法代碼示例。如果您正苦於以下問題:C++ Changed函數的具體用法?C++ Changed怎麽用?C++ Changed使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了Changed函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: QDialog

CLayoutWizard::CLayoutWizard(QWidget *parent) :
        QDialog(parent,Qt::Sheet),
    ui(new Ui::CLayoutWizard)
{
    ui->setupUi(this);
    setWindowModality(Qt::WindowModal);
    setVisible(false);
    TitleElement.SetFont(QFont("Times New Roman",24));
    SubtitleElement.SetFont(QFont("Times New Roman",18));
    ComposerElement.SetFont(QFont("Times New Roman",12));
    NamesElement.SetFont(QFont("Times New Roman",8));
    connect(ui->topMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins()));
    connect(ui->leftMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins()));
    connect(ui->rightMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins()));
    connect(ui->bottomMargin,SIGNAL(Changed()),this,SLOT(UpdateMargins()));
    connect(ui->tabWidget,SIGNAL(currentChanged(int)),this,SLOT(UpdateMargins()));
    connect(ui->NoteSpace,SIGNAL(valueChanged(int)),this,SLOT(SpacingTooltip(int)));
    ui->graphicsView->setScene(&S);
    Printer=new QPrinter();
    pageSetupButton=new QToolButton(ui->graphicsView);
    pageSetupButton->setProperty("transparent",true);
    pageSetupButton->setIcon(QIcon(":/preferences.png"));
    pageSetupButton->setIconSize(QSize(32,32));
    pageSetupButton->setFixedSize(QSize(36,36));
    connect(pageSetupButton,SIGNAL(clicked()),this,SLOT(ShowPageSetup()));
    UpdateMargins();
}
開發者ID:vemod-,項目名稱:ObjectComposerXML,代碼行數:27,代碼來源:clayoutwizard.cpp

示例2: MouseMove

    void MouseMove(IInputProvider* pprovider, const Point& point, bool bCaptured, bool bInside)
    {
        if (bCaptured)
        {
            ZAssert(m_bDragging && m_bCanDrag);

            float fScale = (m_xMax - m_xMin)/m_rectMap.XSize();

            float fDeltaX = fScale * (m_pointLastDrag.X() - point.X());
            float fDeltaY = fScale * (m_pointLastDrag.Y() - point.Y());

            // make sure we don't drag the map off of the screen
            m_xDrag = max(min((m_xClusterMax - m_xClusterMin) - (m_xMax - m_xMin), m_xDrag + fDeltaX), 0);
            m_yDrag = max(min((m_yClusterMax - m_yClusterMin) - (m_yMax - m_yMin), m_yDrag + fDeltaY), 0);

            m_pointLastDrag = point;
            GetWindow()->SetCursor(AWF_CURSOR_DRAG);
            Changed();
        }
        else
        {
 
            if (m_bCanDrag)
            {
                GetWindow()->SetCursor(AWF_CURSOR_DRAG);
            }
            else
            {
                GetWindow()->SetCursor(AWF_CURSOR_DEFAULT);
            }
        }

        Changed();
    }
開發者ID:borgified,項目名稱:Allegiance,代碼行數:34,代碼來源:mappreview.cpp

示例3: disconnect

void ResourceWizard::on_StartStringBuilder_clicked()
{
    disconnect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString)));
    connect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString)));

    StringBuilder->Show(ui->RandomStringValue->text());
    disconnect(StringBuilder,SIGNAL(Changed(QString)),this,SLOT(SetRandomStringEdit(QString)));
}
開發者ID:bablosoft,項目名稱:BAS,代碼行數:8,代碼來源:resourcewizard.cpp

示例4: QMainWindow

MainWindow::MainWindow(Scene *scene, QWidget *parent) :
  QMainWindow(parent),
  ui_(new Ui::MainWindow),
  scene_(scene)
{
  ui_->setupUi(this);

  gl_widget_ = new GLWidget(scene_);
  ui_->opengl_box->layout()->addWidget(gl_widget_);
  //  connect(gl_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged()));

  outer_view_widget_ = new OuterViewWidget(scene_);
  ui_->outerview_box->layout()->addWidget(outer_view_widget_);
  connect(outer_view_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged()));

  ray_tracing_widget_ = new RayTracingWidget(scene_);
  ui_->raytracing_box->layout()->addWidget(ray_tracing_widget_);
  connect(ray_tracing_widget_,SIGNAL(Changed()),this,SLOT(SceneChanged()));
  connect(ui_->recursion_spinBox,SIGNAL(valueChanged(int)),ray_tracing_widget_,SLOT(RayTracingLevel(int)));

  const int default_fov_slider = ((100*(kDefaultFov-kMinFov))/(kMaxFov-kMinFov));
  ui_->fov_slider->setValue(default_fov_slider);
  const int default_near_slider = ((100*(kDefaultNear-kMinNear))/(kMaxNear-kMinNear));
  ui_->near_slider->setValue(default_near_slider);
  const int default_far_slider = ((100*(kDefaultFar-kMinFar))/(kMaxFar-kMinFar));
  ui_->far_slider->setValue(default_far_slider);

  connect(ui_->fov_slider,SIGNAL(valueChanged(int)),this,SLOT(SetFov(int)));
  connect(ui_->near_slider,SIGNAL(valueChanged(int)),this,SLOT(SetNear(int)));
  connect(ui_->far_slider,SIGNAL(valueChanged(int)),this,SLOT(SetFar(int)));
  connect(ui_->light_check,SIGNAL(toggled(bool)),this,SLOT(SetLight(bool)));
  connect(ui_->track_ray_check,SIGNAL(toggled(bool)),this,SLOT(SetTrackRay(bool)));
  SetTrackRay(ui_->track_ray_check->isChecked());
  connect(ui_->fast_render_check,SIGNAL(toggled(bool)),ray_tracing_widget_,SLOT(ToggleFastRenderOnly(bool)));
  ray_tracing_widget_->ToggleFastRenderOnly(ui_->fast_render_check->isChecked());
  //  connect(ui_->image_size_comboBox,SIGNAL(currentIndexChanged(int)),ray_tracing_widget_,SLOT(SelectImageSize(int)));
  //  ray_tracing_widget_->SelectImageSize(ui_->image_size_comboBox->currentIndex());

  connect(ui_->scene_comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(LoadScene(int)));
      //  connect(ui_->load1_pushButton,SIGNAL(clicked()),this,SLOT(LoadScene1()));
      //  connect(ui_->load2_pushButton_2,SIGNAL(clicked()),this,SLOT(LoadScene2()));

      //  connect(gl_widget_,SIGNAL(Moving(bool)),ray_tracing_widget_,SLOT(SetMoving(bool)));

      connect(gl_widget_,SIGNAL(MouseMoved(QMouseEvent*)),ray_tracing_widget_,SLOT(MouseMoved(QMouseEvent*)));
  connect(gl_widget_,SIGNAL(MousePressed(QMouseEvent*)),ray_tracing_widget_,SLOT(MousePressed(QMouseEvent*)));
  connect(gl_widget_,SIGNAL(MouseReleased(QMouseEvent*)),ray_tracing_widget_,SLOT(MouseReleased(QMouseEvent*)));
  connect(gl_widget_,SIGNAL(Wheel(QWheelEvent*)),ray_tracing_widget_,SLOT(Wheel(QWheelEvent*)));

  connect(ui_->render_button,SIGNAL(clicked()),this,SLOT(FinalRender()));

  SceneChanged();
}
開發者ID:QtOpenGL,項目名稱:bustamanprojects,代碼行數:53,代碼來源:mainwindow.cpp

示例5: Guard

void TConfiguration::Default()
{
  TGuard Guard(FCriticalSection);

  FDisablePasswordStoring = false;
  FForceBanners = false;
  FDisableAcceptingHostKeys = false;

  std::unique_ptr<TRegistryStorage> AdminStorage(new TRegistryStorage(GetRegistryStorageKey(), HKEY_LOCAL_MACHINE));
  try__finally
  {
    if (AdminStorage->OpenRootKey(false))
    {
      LoadAdmin(AdminStorage.get());
      AdminStorage->CloseSubKey();
    }
  }
  __finally
  {
//    delete AdminStorage;
  };

  SetRandomSeedFile(FDefaultRandomSeedFile);
  SetPuttyRegistryStorageKey(OriginalPuttyRegistryStorageKey);
  FConfirmOverwriting = true;
  FConfirmResume = true;
  FAutoReadDirectoryAfterOp = true;
  FSessionReopenAuto = 5000;
  FSessionReopenBackground = 2000;
  FSessionReopenTimeout = 0;
  FSessionReopenAutoStall = 60000;
  FTunnelLocalPortNumberLow = 50000;
  FTunnelLocalPortNumberHigh = 50099;
  FCacheDirectoryChangesMaxSize = 100;
  FShowFtpWelcomeMessage = false;
  FExternalIpAddress.Clear();
  FTryFtpWhenSshFails = true;
  SetCollectUsage(FDefaultCollectUsage);
  FSessionReopenAutoMaximumNumberOfRetries = CONST_DEFAULT_NUMBER_OF_RETRIES;
  FDefaultCollectUsage = false;

  FLogging = false;
  FPermanentLogging = false;
  FLogFileName = GetDefaultLogFileName();
  FPermanentLogFileName = FLogFileName;
  FLogFileAppend = true;
  FLogSensitive = false;
  FPermanentLogSensitive = FLogSensitive;
  FLogWindowLines = 100;
  FLogProtocol = 0;
  FPermanentLogProtocol = FLogProtocol;
  UpdateActualLogProtocol();
  FLogActions = false;
  FPermanentLogActions = false;
  FActionsLogFileName = "%TEMP%" WGOOD_SLASH "&S.xml";
  FPermanentActionsLogFileName = FActionsLogFileName;
  FProgramIniPathWrittable = -1;

  Changed();
}
開發者ID:elfmz,項目名稱:far2l,代碼行數:60,代碼來源:Configuration.cpp

示例6: CudaSafeCall

void TransferFunction::onColorTFChanged()
{
    //std::cout<<"Color changed"<<std::endl;
    if(compositeTex)
    {
        CudaSafeCall(cudaDestroyTextureObject(compositeTex));
        compositeTex = 0;
    }

    colorTF->GetTable(0.0, 1.0, TABLE_SIZE, colorTable);
    size_t j = 0, k = 0;
    for(size_t i = 0; i < TABLE_SIZE; ++i)
    {
        compositeTable[j++] = colorTable[k++];
        compositeTable[j++] = colorTable[k++];
        compositeTable[j++] = colorTable[k++];
        j++;
    }
    //CompositeTable();

    CudaSafeCall(cudaMemcpyToArray(array, 0, 0, compositeTable, sizeof(float) * TABLE_SIZE * 4, cudaMemcpyHostToDevice));
    CudaSafeCall(cudaCreateTextureObject(&compositeTex, &resourceDesc, &texDesc, NULL));

    Changed();
}
開發者ID:sunwj,項目名稱:SunVRVR,代碼行數:25,代碼來源:transferfunction.cpp

示例7: blockSignals

QTransferFunction& QTransferFunction::operator = (const QTransferFunction& Other)			
{
	QPresetXML::operator=(Other);

	blockSignals(true);
	
	m_Nodes			= Other.m_Nodes;
	m_pSelectedNode	= Other.m_pSelectedNode;

	// Notify us when the nodes change
	for (int i = 0; i < m_Nodes.size(); i++)
		connect(&m_Nodes[i], SIGNAL(NodeChanged(QNode*)), this, SLOT(OnNodeChanged(QNode*)));

	m_DensityScale		= Other.m_DensityScale;
	m_ShadingType		= Other.m_ShadingType;
	m_GradientFactor	= Other.m_GradientFactor;

	// Update node's range
	UpdateNodeRanges();

	blockSignals(false);

	// Notify others that the function has changed selection has changed
	emit Changed();

	SetSelectedNode(NULL);

	return *this;
}
開發者ID:ChuckDanglars,項目名稱:exposure-render.release110,代碼行數:29,代碼來源:TransferFunction.cpp

示例8: disconnect

void QTransferFunction::RemoveNode(QNode* pNode)
{
	if (!pNode)
		return;

	// Remove the connection
	disconnect(pNode, SIGNAL(NodeChanged(QNode*)), this, SLOT(OnNodeChanged(QNode*)));

	// Node index of the to be removed node
	int NodeIndex = m_Nodes.indexOf(*pNode);

	// Remove from list and memory
	m_Nodes.remove(*pNode);

	// Update ID's
	for (int i = 0; i < m_Nodes.size(); i++)
		m_Nodes[i].m_ID = i;

	// Update node's range
	UpdateNodeRanges();

	// Select the previous node
	NodeIndex = qMax(0, NodeIndex - 1);

	SetSelectedNode(NodeIndex);

	// Inform others that the transfer function has changed
	emit Changed();

	Log("Removed node", "layer-select-point");
}
開發者ID:ChuckDanglars,項目名稱:exposure-render.release110,代碼行數:31,代碼來源:TransferFunction.cpp

示例9: if

bool nuiTreeBase::SetChild(uint32 Index, nuiTreePtr pChild)
{
  pChild->Acquire();
  if (mpChildren.size() < Index+1)
    mpChildren.resize(Index+1);
  if (mpChildren[Index])
    mpChildren[Index]->Release();
  else if (mpChildren[Index])
  {
    mTreeNodeEventSink.DisconnectSource(mpChildren[Index]->Changed);
    mpChildren[Index]->SetParent(NULL);
  }
  mpChildren[Index] = pChild;  
  mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild);
  mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild);
  
  pChild->SetParent(this);

  AutoSort();
  Changed();
  ChildAdded(this, pChild);
  return true;
}
開發者ID:YetToCome,項目名稱:nui3,代碼行數:25,代碼來源:nuiTree.cpp

示例10: AddChild

bool nuiTreeBase::InsertChild(uint32 Index, nuiTreePtr pChild)
{
  if (mpAutoSort)
    return AddChild(pChild);

  if (mpChildren.size() < Index+1)
    mpChildren.resize(Index+1);
  std::vector<nuiTreePtr>::iterator it = mpChildren.begin();
  it+=Index;
  if (it == mpChildren.end())
  {
    mpChildren.resize(mpChildren.size() - 1);
    return false;    
  }
  mpChildren.insert(it, pChild);
  pChild->Acquire();
  mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild);
  mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild);

  pChild->SetParent(this);

  AutoSort();
  Changed();
  ChildAdded(this, pChild);
  return true;
}
開發者ID:YetToCome,項目名稱:nui3,代碼行數:28,代碼來源:nuiTree.cpp

示例11: PrivateSortFunction

bool nuiTreeBase::AddChild(nuiTreePtr pChild)
{
  pChild->Acquire();
  if (!mpAutoSort)
  {
    mpChildren.push_back(pChild);
  }
  else
  {
    // Sorted insert:
    std::vector<nuiTreePtr>::iterator it = std::upper_bound(mpChildren.begin(), mpChildren.end(), pChild, PrivateSortFunction(mpAutoSort));
    mpChildren.insert(it, pChild);
  }

  mTreeNodeEventSink.Connect(pChild->Changed, &nuiTreeBase::OnChildChanged, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildAdded, &nuiTreeBase::OnChildAdded, pChild);
  mTreeNodeEventSink.Connect(pChild->ChildDeleted, &nuiTreeBase::OnChildRemoved, pChild);
  mTreeNodeEventSink.Connect(pChild->Deleted, &nuiTreeBase::OnChildDeleted, pChild);

  pChild->SetParent(this);

  Changed();
  ChildAdded(this, pChild);
  return false;
}
開發者ID:YetToCome,項目名稱:nui3,代碼行數:25,代碼來源:nuiTree.cpp

示例12: ChildDeleted

bool nuiTreeBase::Clear(bool erase)
{
  for (uint32 i = 0; i < mpChildren.size(); i++)
  {
    nuiTreeBase* pChild = mpChildren[i];
    ChildDeleted(this, pChild);
  }
  if (erase)
  {
    std::vector<nuiTreePtr>::iterator it = mpChildren.begin();
    for (; it != mpChildren.end();)
    {
      nuiTreeBase* pChild = (*it);
      it = mpChildren.erase(it);
      pChild->Release();
    }
  }
  else
  {
    for (uint32 i = 0; i < mpChildren.size(); i++)
    {
      mpChildren[i]->SetParent(NULL);
      mTreeNodeEventSink.DisconnectSource(mpChildren[i]->Changed);
      mTreeNodeEventSink.DisconnectSource(mpChildren[i]->ChildAdded);
      mTreeNodeEventSink.DisconnectSource(mpChildren[i]->ChildDeleted);
      mTreeNodeEventSink.DisconnectSource(mpChildren[i]->Deleted);
    }
  }
  mpChildren.clear();
  Changed();
  return true;
}
開發者ID:YetToCome,項目名稱:nui3,代碼行數:32,代碼來源:nuiTree.cpp

示例13: Changed

void nuiBorderDecoration::SetStrokeBottomColor(const nuiColor& color)
{
  mStrokeBottomColor = color;
  mUseStrokeBottomColor = true;
  mUseStrokeGlobalColor = false;
  Changed();
}
開發者ID:JamesLinus,項目名稱:nui3,代碼行數:7,代碼來源:nuiBorderDecoration.cpp

示例14: assert

void EntityRef::onEntitySeen(Entity* e)
{
    assert(e);
    m_inner = e;
    m_inner->BeingDeleted.connect(sigc::mem_fun(this, &EntityRef::onEntityDeleted));	
	Changed();
}
開發者ID:worldforge,項目名稱:eris,代碼行數:7,代碼來源:EntityRef.cpp

示例15: Changed

///////////////////////////////////////////////////////////
/// Tone change
///////////////////////////////////////////////////////////
void Bitmap::ToneChange(Tone tone) {
	if (tone.red == 0 && tone.green == 0 && tone.blue == 0 && tone.gray == 0) return;

	Uint8* dst_pixels = (Uint8*)&pixels[0];

	if (tone.gray == 0) {
		for (int i = 0; i < GetHeight(); i++) {
			for (int j = 0; j < GetWidth(); j++) {
				Uint8* pixel = dst_pixels;
				pixel[0] = (Uint8)max(min(pixel[0] + tone.red, 255), 0);
				pixel[1] = (Uint8)max(min(pixel[1] + tone.green, 255), 0);
				pixel[2] = (Uint8)max(min(pixel[2] + tone.blue, 255), 0);
				dst_pixels += 4;
			}
		}
	} else {
		double factor = (255 - tone.gray) / 255.0;
		double gray;
		for (int i = 0; i < GetHeight(); i++) {
			for (int j = 0; j < GetWidth(); j++) {
				Uint8* pixel = dst_pixels;

				gray = pixel[0] * 0.299 + pixel[1] * 0.587 + pixel[2] * 0.114;
				pixel[0] = (Uint8)max(min((pixel[0] - gray) * factor + gray + tone.red + 0.5, 255), 0);
				pixel[1] = (Uint8)max(min((pixel[1] - gray) * factor + gray + tone.green + 0.5, 255), 0);
				pixel[2] = (Uint8)max(min((pixel[2] - gray) * factor + gray + tone.blue + 0.5, 255), 0);
				dst_pixels += 4;
			}
		}
	}

	Changed();
}
開發者ID:cstrahan,項目名稱:argss,代碼行數:36,代碼來源:bitmap.cpp


注:本文中的Changed函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。