本文整理汇总了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();
}
示例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;
}
示例3: SwitchCurrentDrawBlock
void DrawsWidget::SwitchCurrentDrawBlock() {
Draw* draw = m_draws_controller->GetSelectedDraw();
if (draw == NULL)
return;
BlockDraw(draw->GetDrawNo(), !draw->GetBlocked());
}
示例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();
}