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


C++ Draw::GetDrawNo方法代码示例

本文整理汇总了C++中Draw::GetDrawNo方法的典型用法代码示例。如果您正苦于以下问题:C++ Draw::GetDrawNo方法的具体用法?C++ Draw::GetDrawNo怎么用?C++ Draw::GetDrawNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Draw的用法示例。


在下文中一共展示了Draw::GetDrawNo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ResetDraws

void WxGraphs::ResetDraws(DrawsController *controller) {
	m_draws.resize(0);
	for (size_t i = 0; i < controller->GetDrawsCount(); i++)
		m_draws.push_back(controller->GetDraw(i));

	size_t pc = m_graphs.size();
	if (pc > m_draws.size()) for (size_t i = m_draws.size(); i < pc; i++)
			delete m_graphs.at(i);
	m_graphs.resize(m_draws.size());

	for (size_t i = pc; i < m_draws.size(); i++) {
		m_graphs.at(i) = new GraphView(this);
		m_graphs.at(i)->Attach(m_draws[i]);
		m_graphs.at(i)->DrawAll();
	}

	Draw* d = controller->GetSelectedDraw();
	if (d)
		m_bg_view->Attach(m_draws[d->GetDrawNo()]);

	for (size_t i = 0; i < std::min(pc, m_graphs.size()); i++)
		m_graphs.at(i)->DrawInfoChanged(m_draws[i]);


	SetMargins();

	Refresh();

}
开发者ID:marta09,项目名称:szarp,代码行数:29,代码来源:wxgraphs.cpp

示例2: GetUrl

wxString DrawsWidget::GetUrl(bool with_infinity) {
	Draw* d = m_draws_controller->GetSelectedDraw();
	if (d == NULL)
		return wxEmptyString;

	time_t t;

	if (with_infinity && m_draws_controller->AtTheNewestValue()) {
		t = std::numeric_limits<time_t>::max();
	} else {
		t = GetCurrentTime().GetTicks();
	}

	wxString prefix = m_draws_controller->GetSet()->GetDrawsSets()->GetPrefix();

	DrawInfo* di = d->GetDrawInfo();

	SetInfoDataObject* wido =
		new SetInfoDataObject(prefix, di->GetSetName(), d->GetPeriod(), t , d->GetDrawNo());

	wxString tmp = wido->GetUrl();

	delete wido;

	return tmp;
}
开发者ID:,项目名称:,代码行数:26,代码来源:

示例3: SwitchCurrentDrawBlock

void DrawsWidget::SwitchCurrentDrawBlock() {
	Draw* draw = m_draws_controller->GetSelectedDraw();
	if (draw == NULL)
		return;

	BlockDraw(draw->GetDrawNo(), !draw->GetBlocked());
}
开发者ID:,项目名称:,代码行数:7,代码来源:

示例4: CopyToClipboard

void DrawsWidget::CopyToClipboard() {
	Draw *d = m_draws_controller->GetSelectedDraw();

	if (d == NULL)
		return;

	if (wxTheClipboard->Open() == false)
		return;

	DrawInfo *di = d->GetDrawInfo();

	SetInfoDataObject* wido =
		new SetInfoDataObject(di->GetBasePrefix(), di->GetSetName(), d->GetPeriod(), d->GetCurrentTime().GetTicks(), d->GetDrawNo());

	wxTheClipboard->SetData(wido);
	wxTheClipboard->Close();
}
开发者ID:,项目名称:,代码行数:17,代码来源:


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