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


C++ Bar类代码示例

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


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

示例1: main

int main ()
{
  Bar b;

  b.f ();// { dg-error "no matching" } 
  b.f (10);
}
开发者ID:0day-ci,项目名称:gcc,代码行数:7,代码来源:overload1.C

示例2: THISBACK

void FormEdit::CreateMenuBar(Bar& bar)
{
	bar.Add(t_("File"), THISBACK(FileBar));
	bar.Add(t_("Item"), THISBACK(ItemBar));
	bar.Add(t_("Form"), THISBACK(FormBar));
	bar.Add(t_("View"), THISBACK(ViewBar));
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:7,代码来源:FormEdit.cpp

示例3: AlignObjectMenu

void FormView::AlignObjectMenu(Bar& bar)
{
	bar.Add(t_("Top "), THISBACK(AlignTopSelection));
	bar.Add(t_("Left"), THISBACK(AlignLeftSelection));
	bar.Add(t_("Right"), THISBACK(AlignRightSelection));
	bar.Add(t_("Bottom "), THISBACK(AlignBottomSelection));
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:7,代码来源:FormViewBar.cpp

示例4: QPointF

void NoteEntryAction::renderKeyboardPreview(QPainter& painter, const MusicCursor& cursor)
{
    Staff* staff = cursor.staff();
    Part* part = staff->part();
    Sheet* sheet = part->sheet();
    Bar* bar = sheet->bar(cursor.bar());
    QPointF p = bar->position() + QPointF(0, staff->top());
    Voice* voice = cursor.staff()->part()->voice(cursor.voice());
    VoiceBar* vb = voice->bar(bar);

    if (cursor.element() >= vb->elementCount()) {
        // cursor is past last element in bar, position of cursor is
        // halfway between last element and end of bar
        if (vb->elementCount() == 0) {
            // unless entire voicebar is still empty
            p.rx() += 15.0;
        } else {
            VoiceElement* ve = vb->element(vb->elementCount()-1);
            p.rx() += (ve->x() + bar->size()) / 2;
        }
    } else {
        // cursor is on an element, get the position of that element
        p.rx() += vb->element(cursor.element())->x();
    }

    p.ry() += (cursor.staff()->lineCount() - 1)* cursor.staff()->lineSpacing();
    p.ry() -= cursor.staff()->lineSpacing() * cursor.line() / 2;

    m_tool->shape()->renderer()->renderNote(painter, m_duration < QuarterNote ? QuarterNote : m_duration, p, 0, Qt::magenta);
}
开发者ID:KDE,项目名称:calligra-history,代码行数:30,代码来源:NoteEntryAction.cpp

示例5: main

int main( int argc, char **argv )
{
    co::BufferCache cache( 10 );
    co::LocalNodePtr node = new co::LocalNode;

    const uint64_t size = co::OCommand::getSize();
    co::BufferPtr buffer = cache.alloc( co::Buffer::getCacheSize( ));
    buffer->resize( size );
    reinterpret_cast< uint64_t* >( buffer->getData( ))[ 0 ] = size;

    co::ICommand command( node, node, buffer, false );
    command.setType( co::COMMANDTYPE_NODE );
    command.setCommand( co::CMD_NODE_CUSTOM );

    Bar bar;
    FooBar fooBar;
    BarFoo barFoo;

    bar.dispatchCommand( command );
    fooBar.dispatchCommand( command );
    barFoo.dispatchCommand ( command );
    TESTINFO( calls == 3, calls );

    return EXIT_SUCCESS;
}
开发者ID:bohara,项目名称:Collage,代码行数:25,代码来源:dispatcher.cpp

示例6: main

int main(int argv, char **args)
{
    QApplication app(argv, args);

    CodeEditor editor;
    editor.setWindowTitle(QObject::tr("Code Editor Example"));
    editor.show();

    Window w;
    w.show();

    Foo foo;
    foo.doFoo();

    Blub b;
    b.blubber();

    Bar bar;
    bar.doBar();

    Abc abc;
    abc.doAbc();

    Xyz xyz;
    xyz.doXyz();

    Yaf yaf;
    yaf.doYaf();

    LibC lc;
    lc.foo();

    return app.exec();
}
开发者ID:skyopener,项目名称:OSCCAR-dev,代码行数:34,代码来源:main.cpp

示例7: _tmain

int _tmain(int argc, _TCHAR* argv[])
{
	Vertex3d* pv3d = new Vertex3d;
	Point2d* p2d = pv3d;
	p2d->z();

	// 子类到第二个基类的指针转换
	Vertex* pv = pv3d;

	// virtual function的调用
	pv->vfun2();
    /*
        vptr vptr_Vertex = *((vptr*)pv);
        (*(vptr + 1))(pv);
    */
	_asm
	{
		mov eax, dword ptr [pv] 
		mov edx, dword ptr [eax] 
		mov eax, dword ptr [edx + 4] 
		call eax  
	}

	// Bar的基类是一个没有virtual function的struct
	// 可看出vptr被放在了起始处
	Bar* pb = new Bar;
	pb->fun();
	Foo* pf = pb;

	return 0;
}
开发者ID:bluecover,项目名称:cpp_snippet,代码行数:31,代码来源:where_is_vptr.cpp

示例8: main

int main()
{
    /* regular cast */
//    float d=3.14159265;
//    int i = static_cast<int>(d);
//    cout << "i = " << i << endl << endl;




    for( int n = 0; n < 5; ++n )
    {
        Base* base = CreateRandom();

        base->DoIt();

        Bar* bar = static_cast<Bar*>(base);
        Foo* foo = static_cast<Foo*>(base);
        if( bar )
            bar->BarIt();
        if( foo )
            foo->FooIt();
        delete base;
        base = NULL;

        printf("-------------STATIC_CAST-------------- \n");
    }

    return 0;
}
开发者ID:eslinux,项目名称:eslinuxprogramming,代码行数:30,代码来源:static_cast.cpp

示例9: THISBACK

void LayoutDesigner::MainBar(Bar& bar) {
	bar.Add("File", THISBACK(FileBar));
	bar.Add("Edit", THISBACK(EditBar));
	bar.Add("Layout", THISBACK(LayoutBar));
	bar.Add("Language", THISBACK(LangBar));
	bar.Add("Item", THISBACK(ItemBar));
	bar.Add("Options", THISBACK(OptionsBar));
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,代码来源:DesignerWin.cpp

示例10: test3

void test3()
 {
  using namespace AM3359::CONTROL;

  Bar bar;

  Printf(Con,"#;\n",bar.get_Conf_GPMC_A9());
 }
开发者ID:SergeyStrukov,项目名称:CCore-2-99,代码行数:8,代码来源:test6011.LCD.cpp

示例11: slotNextRecord

void FuturesDialog::slotNextRecord ()
{
  Bar record;
  db->getNextBar(currentDate, record);
  if (record.getEmptyFlag())
    return;
  updateFields(record);
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:8,代码来源:FuturesDialog.cpp

示例12: GameMenu

void Puzzle::GameMenu(Bar& bar)
{
    bar.Add(t_("New game"), THISBACK(New));
    bar.Add(t_("Setup.."), THISBACK(Setup));
    bar.Add(t_("Best scores.."), THISBACK(Scores));
    bar.Separator();
    bar.Add(t_("Exit"), Breaker());
}
开发者ID:kolyden,项目名称:mirror,代码行数:8,代码来源:Puzzle.cpp

示例13: PackageMenu

void SelectPackageDlg::PackageMenu(Bar& menu)
{
	bool b = GetCurrentName().GetCount();
	menu.Add("New package..", THISBACK(OnNew));
	menu.Separator();
	menu.Add(b, "Rename package..", THISBACK(RenamePackage));
	menu.Add(b, "Delete package", THISBACK(DeletePackage));
}
开发者ID:ultimatepp,项目名称:mirror,代码行数:8,代码来源:SelectPkg.cpp

示例14: testAddBar

 void testAddBar()
 {
     Bar* bar = sheet->addBar();
     
     QCOMPARE(bar->sheet(), sheet);
     QCOMPARE(sheet->barCount(), 1);
     QCOMPARE(sheet->bar(0), bar);
 }
开发者ID:KDE,项目名称:calligra,代码行数:8,代码来源:SheetTest.cpp

示例15: slotFirstRecord

void FuturesDialog::slotFirstRecord ()
{
  Bar record;
  db->getFirstBar(record);
  if (record.getEmptyFlag())
    return;
  updateFields(record);
}
开发者ID:DigitalPig,项目名称:qtstalker-qt4,代码行数:8,代码来源:FuturesDialog.cpp


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