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


C++ Q3Grid类代码示例

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


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

示例1: Q3Grid

void ActivityDialog::init_tab(CondDialog & d, InfoData & cd,
                              const char * lbl, bool enabled)
{
    Q3Grid * grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("Pre\ncondition : "), grid);
    d.edpre = new MultiLineEdit(grid);
    d.edpre->setText(cd.first);

    if (visit)
        d.edpre->setReadOnly(TRUE);

    new QLabel(TR("Post\ncondition : "), grid);
    d.edpost = new MultiLineEdit(grid);
    d.edpost->setText(cd.second);

    if (visit)
        d.edpost->setReadOnly(TRUE);

    addTab(grid, lbl);

    if (! enabled)
        removePage(grid);
}
开发者ID:harmegnies,项目名称:douml,代码行数:26,代码来源:ActivityDialog.cpp

示例2: Q3Grid

void PinDialog::init_tab(QWidget *& tab, MultiLineEdit *& ed, const char * v,
			 const char * lbl, const char * sl, bool enabled) {
  bool visit = !hasOkButton();
  Q3Grid * grid = new Q3Grid(2, this);

  tab = grid;
  grid->setMargin(5);
  grid->setSpacing(5);
  
  Q3VBox * vtab = new Q3VBox(grid);
  
  new QLabel(TR("selection : "), vtab);
  if (! visit)
    connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()), this, sl);
  ed = new MultiLineEdit(grid);

  QFont font = ed->font();

  if (! hasCodec())
    font.setFamily("Courier");
  font.setFixedPitch(TRUE);
  ed->setFont(font);
  ed->setText(v);
  if (visit)
    ed->setReadOnly(TRUE);
  
  addTab(grid, lbl);
  
  if (! enabled)
    removePage(grid);
}
开发者ID:SciBoy,项目名称:douml,代码行数:31,代码来源:PinDialog.cpp

示例3: ViewWidget

HCircleView::HCircleView( int viewID_, QWidget *parent )
 : ViewWidget( viewID_, parent)
{
  setCaption("Harmonic Circle");

Q3BoxLayout *mainLayout = new Q3HBoxLayout(this);

  Q3BoxLayout *leftLayout = new Q3VBoxLayout(mainLayout);
  Q3BoxLayout *rightLayout = new Q3VBoxLayout(mainLayout);
 
  Q3Grid *waveFrame = new Q3Grid(1, this);
  waveFrame->setFrameStyle(Q3Frame::WinPanel | Q3Frame::Sunken);
  leftLayout->addWidget(waveFrame);

  hCircleWidget = new HCircleWidget(waveFrame);

  Q3BoxLayout *bottomLayout = new Q3HBoxLayout(leftLayout);
 
  QwtWheel* ZoomWheel = new QwtWheel(this);
  ZoomWheel->setOrientation(Qt::Vertical);
  ZoomWheel->setWheelWidth(14);
  ZoomWheel->setRange(0.001, 0.1, 0.001, 1);
  ZoomWheel->setValue(0.007);
  hCircleWidget->setZoom(0.007);
  QToolTip::add(ZoomWheel, "Zoom in or out");
  rightLayout->addWidget(ZoomWheel);
  
  QwtWheel* lowestValueWheel = new QwtWheel(this);
  lowestValueWheel->setOrientation(Qt::Vertical);
  lowestValueWheel->setWheelWidth(14);
  lowestValueWheel->setRange(-160, 10, 0.01, 1);
  lowestValueWheel->setValue(-100);
  hCircleWidget->setLowestValue(-100);
  QToolTip::add(lowestValueWheel, "Change the lowest value");
  rightLayout->addWidget(lowestValueWheel);
  rightLayout->addStretch(2);
 
  QwtWheel* thresholdWheel = new QwtWheel(this);
  thresholdWheel->setOrientation(Qt::Horizontal);
  thresholdWheel->setWheelWidth(14);
  thresholdWheel->setRange(-160, 10, 0.01, 1);
  thresholdWheel->setValue(-100);
  hCircleWidget->setThreshold(-100);
  QToolTip::add(thresholdWheel, "Change the harmonic threshold");
  bottomLayout->addWidget(thresholdWheel);
  bottomLayout->addStretch(2);

  connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setZoom(double)));
  connect(ZoomWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

  connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setLowestValue(double)));
  connect(lowestValueWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

  connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(setThreshold(double)));
  connect(thresholdWheel, SIGNAL(valueChanged(double)), hCircleWidget, SLOT(update()));

}
开发者ID:Guildenstern,项目名称:Tartini,代码行数:57,代码来源:hcircleview.cpp

示例4: Q3Grid

void ParameterSetDialog::init_uml_tab()
{
    bool visit = !hasOkButton();

    BrowserParameterSet * bn =
        (BrowserParameterSet *) data->get_browser_node();
    Q3VBox * vbox;
    Q3Grid * grid = new Q3Grid(2, this);

    umltab = grid;
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(TRUE, grid);
    edstereotype->insertItem(toUnicode(data->get_stereotype()));

    if (! visit) {
        edstereotype->insertStringList(BrowserParameterSet::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlParameterSet));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    vbox = new Q3VBox(grid);
    new QLabel(TR("description :"), vbox);

    if (! visit) {
        connect(new SmallPushButton(TR("Editor"), vbox), SIGNAL(clicked()),
                this, SLOT(edit_description()));
    }

    comment = new MultiLineEdit(grid);
    comment->setReadOnly(visit);
    comment->setText(bn->get_comment());
    QFont font = comment->font();

    if (! hasCodec())
        font.setFamily("Courier");

    font.setFixedPitch(TRUE);
    comment->setFont(font);

    addTab(grid, "Uml");
}
开发者ID:harmegnies,项目名称:douml,代码行数:53,代码来源:ParameterSetDialog.cpp

示例5: Q3TabDialog

ComponentDialog::ComponentDialog(SimpleData * nd)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), data(nd)
{
    nd->get_browser_node()->edit_start();

    if (nd->get_browser_node()->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("component dialog"));

    BrowserComponent * bn = (BrowserComponent *) nd->get_browser_node();

    init_uml_tab();
    rqs = bn->get_required_classes();
    init_l_tab(rq_page, rq_stereotypefilter, &ComponentDialog::rq_stereotypeFilterActivated,
               SLOT(rq_stereotypeFilterActivated(const QString &)),
               SLOT(require_cls()), SLOT(unrequire_cls()),
               lb_rq_available, lb_rq, rqs, TR("Required classes"));
    prs = bn->get_provided_classes();
    init_l_tab(pr_page, pr_stereotypefilter, &ComponentDialog::pr_stereotypeFilterActivated,
               SLOT(pr_stereotypeFilterActivated(const QString &)),
               SLOT(provide_cls()), SLOT(unprovide_cls()),
               lb_pr_available, lb_pr, prs, TR("Provided classes"));
    rzs = bn->get_realizing_classes();
    init_l_tab(rz_page, rz_stereotypefilter, &ComponentDialog::rz_stereotypeFilterActivated,
               SLOT(rz_stereotypeFilterActivated(const QString &)),
               SLOT(realize_cls()), SLOT(unrealize_cls()),
               lb_rz_available, lb_rz, rzs, TR("Realizing classes"));

    // USER : list key - value

    Q3Grid * grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    kvtable = new KeyValuesTable((BrowserComponent *) data->get_browser_node(),
                                 grid, !hasOkButton());
    addTab(grid, TR("Properties"));

    //

    connect(this, SIGNAL(currentChanged(QWidget *)),
            this, SLOT(change_tabs(QWidget *)));

    open_dialog(this);
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:52,代码来源:ComponentDialog.cpp

示例6: Q3TabDialog

ParameterSetDialog::ParameterSetDialog(ParameterSetData * nd)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), data(nd)
{
    nd->browser_node->edit_start();

    if (nd->browser_node->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("ParameterSet dialog"));

    init_uml_tab();
    init_pins_tab();

    // USER : list key - value

    Q3Grid * grid = new Q3Grid(2, this);

    grid->setMargin(5);
    grid->setSpacing(5);

    kvtable = new KeyValuesTable((BrowserParameterSet *) data->get_browser_node(),
                                 grid, !hasOkButton());
    addTab(grid, TR("Properties"));

    //

    connect(this, SIGNAL(currentChanged(QWidget *)),
            this, SLOT(change_tabs(QWidget *)));

    open_dialog(this);
}
开发者ID:harmegnies,项目名称:douml,代码行数:37,代码来源:ParameterSetDialog.cpp

示例7: Q3TabDialog

FlowDialog::FlowDialog(FlowData * d)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), flow(d)
{
    d->browser_node->edit_start();

    if (d->browser_node->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("Flow dialog"));
    visit = !hasOkButton();

    BrowserNode * bn = flow->browser_node;
    Q3Grid * grid;

    //
    // general tab
    //

    grid = new Q3Grid(2, this);
    umltab = grid;
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(!visit, grid);
    edstereotype->insertItem(toUnicode(flow->get_stereotype()));

    if (!visit) {
        edstereotype->insertStringList(BrowserFlow::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlFlow));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    Q3VBox * vtab = new Q3VBox(grid);
    new QLabel(TR("description :"), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()),
                this, SLOT(edit_description()));

    comment = new MultiLineEdit(grid);
    comment->setReadOnly(visit);
    comment->setText(bn->get_comment());

    addTab(grid, "Uml");

    // UML / OCL
    init_tab(uml, flow->uml, "Ocl", SLOT(edit_uml_guard()),
             SLOT(edit_uml_selection()), SLOT(edit_uml_transformation()),
             TRUE);

    // CPP
    init_tab(cpp, flow->cpp, "C++", SLOT(edit_cpp_guard()),
             SLOT(edit_cpp_selection()), SLOT(edit_cpp_transformation()),
             GenerationSettings::cpp_get_default_defs());

    // Java
    init_tab(java, flow->java, "Java", SLOT(edit_java_guard()),
             SLOT(edit_java_selection()), SLOT(edit_java_transformation()),
             GenerationSettings::java_get_default_defs());

    // USER : list key - value

    grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    kvtable = new KeyValuesTable(bn, grid, visit);
    addTab(grid, TR("Properties"));

    //

    connect(this, SIGNAL(currentChanged(QWidget *)),
            this, SLOT(change_tabs(QWidget *)));

    open_dialog(this);
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:92,代码来源:FlowDialog.cpp

示例8: Q3TabDialog

StateDialog::StateDialog(StateData * d)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), state(d)
{
    d->browser_node->edit_start();

    if (d->browser_node->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("State dialog"));
    visit = !hasOkButton();

    BrowserNode * bn = state->browser_node;
    Q3Grid * grid;

    //
    // general tab
    //

    grid = new Q3Grid(2, this);
    umltab = grid;
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(!visit, grid);
    edstereotype->insertItem(toUnicode(state->get_stereotype()));

    if (!visit) {
        edstereotype->insertStringList(BrowserState::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlState));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    connect(new SmallPushButton(TR("specification :"), grid), SIGNAL(clicked()),
            this, SLOT(menu_specification()));
    edspecification = new Q3ComboBox(FALSE, grid);
    edspecification->setSizePolicy(sp);

    if (visit) {
        if (state->get_specification() == 0)
            edspecification->insertItem("");
        else
            edspecification->insertItem(state->get_specification()->full_name(TRUE));
    }
    else {
        edspecification->insertItem("");
        edspecification->setAutoCompletion(completion());
        BrowserOperation::instances(opers);
        opers.full_names(speclist);
        edspecification->insertStringList(speclist);
        edspecification->setCurrentItem((state->get_specification() == 0)
                                        ? 0
                                        : opers.findRef(state->get_specification()) + 1);
    }

    switch (((BrowserNode *) bn->parent())->get_type()) {
    case UmlState:
    case UmlRegion:
        if ((state->get_reference() != 0) || (bn->firstChild() == 0)) {
            connect(new SmallPushButton(TR("reference :"), grid), SIGNAL(clicked()),
                    this, SLOT(menu_reference()));
            edreference = new Q3ComboBox(FALSE, grid);
            edreference->setSizePolicy(sp);

            if (visit) {
                if (state->get_reference() == 0)
                    edreference->insertItem("");
                else
                    edreference->insertItem(state->get_reference()->full_name(TRUE));
            }
            else {
                edreference->insertItem("");
                edreference->setAutoCompletion(completion());

                if (((BrowserState *) bn)->can_reference()) {
                    BrowserState::instances(states, TRUE);

                    BrowserNode * st = states.first();

                    while (st != 0) {
                        if (!((BrowserState *) bn)->can_reference((BrowserState *) st) ||
                            ((BrowserState *) st)->is_ref()) {
                            states.remove();
                            st = states.current();
                        }
//.........这里部分代码省略.........
开发者ID:harmegnies,项目名称:douml,代码行数:101,代码来源:StateDialog.cpp

示例9: Q3TabDialog

ActivityPartitionDialog::ActivityPartitionDialog(ActivityPartitionData * d)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), data(d)
{
    d->browser_node->edit_start();

    if (d->browser_node->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("Activity Partition dialog"));

    bool visit = !hasOkButton();

    // general tab

    BrowserNode * bn = data->get_browser_node();
    Q3Grid * grid = new Q3Grid(2, this);

    umltab = grid;
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(!visit, grid);
    edstereotype->insertItem(toUnicode(data->get_stereotype()));

    if (! visit) {
        edstereotype->insertStringList(BrowserActivityPartition::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlActivityPartition));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    connect(new SmallPushButton(TR("represents :"), grid), SIGNAL(clicked()),
            this, SLOT(menu_represents()));
    edrepresents = new Q3ComboBox(FALSE, grid);

    if ((data->represents != 0) && !data->represents->deletedp()) {
        represented = data->represents;
        edrepresents->insertItem(*(data->represents->pixmap(0)),
                                 data->represents->full_name(TRUE));
    }
    else {
        represented = 0;
        edrepresents->insertItem("");
    }

    if (! visit)
        edrepresents->insertItem("");

    edrepresents->setCurrentItem(0);
    edrepresents->setSizePolicy(sp);

    Q3HBox * htab;

    new QLabel(grid);
    htab = new Q3HBox(grid);
    new QLabel("  ", htab);
    dimension_cb = new QCheckBox(TR("is dimension"), htab);

    if (data->is_dimension)
        dimension_cb->setChecked(TRUE);

    dimension_cb->setDisabled(visit);
    new QLabel("", htab);
    external_cb = new QCheckBox(TR("is external"), htab);

    if (data->is_external)
        external_cb->setChecked(TRUE);

    external_cb->setDisabled(visit);
    new QLabel("", htab);

    Q3VBox * vtab = new Q3VBox(grid);
    new QLabel(TR("description :"), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()),
                this, SLOT(edit_description()));

    comment = new MultiLineEdit(grid);
    comment->setReadOnly(visit);
    comment->setText(bn->get_comment());
    QFont font = comment->font();

    if (! hasCodec())
        font.setFamily("Courier");
//.........这里部分代码省略.........
开发者ID:harmegnies,项目名称:douml,代码行数:101,代码来源:ActivityPartitionDialog.cpp

示例10: Q3TabDialog

ActivityDialog::ActivityDialog(ActivityData * d)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), activity(d)
{
    d->browser_node->edit_start();

    if (d->browser_node->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("Activity dialog"));
    visit = !hasOkButton();

    BrowserNode * bn = activity->browser_node;
    Q3Grid * grid;

    //
    // general tab
    //

    grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(!visit, grid);
    edstereotype->insertItem(toUnicode(activity->get_stereotype()));

    if (!visit) {
        edstereotype->insertStringList(BrowserActivity::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlActivity));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    connect(new SmallPushButton(TR("specification :"), grid), SIGNAL(clicked()),
            this, SLOT(menu_specification()));
    edspecification = new Q3ComboBox(FALSE, grid);
    edspecification->setSizePolicy(sp);

    if (visit) {
        if (activity->get_specification() == 0)
            edspecification->insertItem("");
        else
            edspecification->insertItem(activity->get_specification()->full_name(TRUE));
    }
    else {
        edspecification->insertItem("");
        edspecification->setAutoCompletion(completion());
        BrowserOperation::instances(opers);
        opers.full_names(list);
        edspecification->insertStringList(list);
        edspecification->setCurrentItem((activity->get_specification() == 0)
                                        ? 0
                                        : opers.findRef(activity->get_specification()) + 1);
    }

    new QLabel(grid);
    Q3ButtonGroup * bg =
        new Q3ButtonGroup(3, Qt::Horizontal, QString(), grid);

    readonly_cb = new QCheckBox(TR("read only"), bg);

    if (activity->read_only)
        readonly_cb->setChecked(TRUE);

    readonly_cb->setDisabled(visit);

    singlexec_cb = new QCheckBox(TR("single execution"), bg);

    if (activity->single_execution)
        singlexec_cb->setChecked(TRUE);

    singlexec_cb->setDisabled(visit);

    active_cb = new QCheckBox(TR("active"), bg);

    if (activity->is_active)
        active_cb->setChecked(TRUE);

    active_cb->setDisabled(visit);

    Q3VBox * vtab = new Q3VBox(grid);
    new QLabel(TR("description :"), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()),
                this, SLOT(edit_description()));
//.........这里部分代码省略.........
开发者ID:harmegnies,项目名称:douml,代码行数:101,代码来源:ActivityDialog.cpp

示例11: QDialog

EnvDialog::EnvDialog(bool conv, bool noid)
    : QDialog(0, "Environment dialog", TRUE), conversion(conv)
{
    setCaption(TR("Environment dialog"));

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);
    Q3HBox * htab;
    Q3Grid * grid = new Q3Grid(2, this);
    QPushButton * button;
    QString s;

    vbox->addWidget(grid);
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(grid);
    new QLabel(TR("MANDATORY, choose a value between 2 and 127 not used by an other person working at the same time on a project with you.\n"
                  "To be safe, if possible choose a value not used by an other person even not working on a given project with you"),
               grid);

    new QLabel(TR("Own identifier "), grid);
    htab = new Q3HBox(grid);

    if (conv)
        s = getenv("BOUML_ID");	// yes !
    else if (! noid)
        s.setNum(user_id());

    ed_id = new QLineEdit(s, htab);

    if (BrowserView::get_project() != 0) {
        ed_id->setEnabled(FALSE);
        new QLabel(TR("   The identifier can't be modified while a project is load"), htab);
    }

    //

    new QLabel(grid);
    new QLabel(TR("\nOptional, to indicate where are the HTML pages of the reference manual. Used by the help (called by the F1 key) to show the\n"
                  "chapter corresponding to the kind of the element selected in the browser"),
               grid);

    new QLabel(TR("Manual path"), grid);
    htab = new Q3HBox(grid);
    ed_doc = new QLineEdit(htab);

    if (!conv)
        ed_doc->setText(manual_dir());











    new QLabel(" ", htab);
    button = new QPushButton(TR("Browse"), htab);
    connect(button, SIGNAL(clicked()), this, SLOT(doc_browse()));

    //

    new QLabel(grid);
    new QLabel(TR("\nOptional, to indicate a web navigator program. If it is not defined the reference manual will be shown with an internal simple viewer"),
               grid);
    new QLabel(TR("Navigator"), grid);
    htab = new Q3HBox(grid);
    ed_navigator = new QLineEdit(htab);

    if (!conv)
        ed_navigator->setText(navigator_path());

    new QLabel(" ", htab);
    button = new QPushButton(TR("Browse"), htab);
    connect(button, SIGNAL(clicked()), this, SLOT(navigator_browse()));

    //

    new QLabel(grid);
    new QLabel(TR("\nOptional, to indicate a template project. This allows to create new projects getting all the template project settings"),
               grid);
    new QLabel("Template project", grid);
    htab = new Q3HBox(grid);

    if (conv)
        s = getenv("BOUML_TEMPLATE");	// yes !
    else
        s = template_project();

    ed_template = new QLineEdit(s, htab);
    new QLabel(" ", htab);
    button = new QPushButton(TR("Browse"), htab);
    connect(button, SIGNAL(clicked()), this, SLOT(template_browse()));

    //

    new QLabel(grid);
//.........这里部分代码省略.........
开发者ID:jeremysalwen,项目名称:douml,代码行数:101,代码来源:EnvDialog.cpp

示例12: Q3TabDialog

UseCaseDialog::UseCaseDialog(UseCaseData * u)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose), uc(u)
{
    BrowserNode * bn = u->browser_node;

    bn->edit_start();

    if (bn->is_writable()) {
        setOkButton(TR("OK"));
        setCancelButton(TR("Cancel"));
    }
    else {
        setOkButton(QString());
        setCancelButton(TR("Close"));
    }

    setCaption(TR("Use Case dialog"));

    bool visit = !hasOkButton();

    // general tab

    Q3Grid * grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("name : "), grid);
    edname = new LineEdit(bn->get_name(), grid);
    edname->setReadOnly(visit);

    new QLabel(TR("stereotype : "), grid);
    edstereotype = new Q3ComboBox(!visit, grid);
    edstereotype->insertItem(toUnicode(uc->get_stereotype()));

    if (! visit) {
        edstereotype->insertStringList(BrowserUseCase::default_stereotypes());
        edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlUseCase));
        edstereotype->setAutoCompletion(completion());
    }

    edstereotype->setCurrentItem(0);
    QSizePolicy sp = edstereotype->sizePolicy();
    sp.setHorData(QSizePolicy::Expanding);
    edstereotype->setSizePolicy(sp);

    new QLabel(TR("extension \npoints : "), grid);
    extension_points = new MultiLineEdit(grid);
    extension_points->setReadOnly(visit);
    extension_points->setText(uc->get_extension_points());
    QFont font = extension_points->font();

    if (! hasCodec())
        font.setFamily("Courier");

    font.setFixedPitch(TRUE);
    extension_points->setFont(font);

    Q3VBox * vtab = new Q3VBox(grid);
    new QLabel(TR("description :"), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()),
                this, SLOT(edit_description()));

    comment = new MultiLineEdit(grid);
    comment->setReadOnly(visit);
    comment->setText(bn->get_comment());
    comment->setFont(font);

    addTab(grid, "Uml");

    // USER : list key - value

    grid = new Q3Grid(2, this);
    grid->setMargin(5);
    grid->setSpacing(5);

    kvtable = new KeyValuesTable(bn, grid, visit);
    addTab(grid, TR("Properties"));

    open_dialog(this);
}
开发者ID:harmegnies,项目名称:douml,代码行数:82,代码来源:UseCaseDialog.cpp

示例13: Q3TabDialog

AttributeDialog::AttributeDialog(AttributeData * a, bool new_st_attr)
    : Q3TabDialog(0, 0, FALSE, Qt::WDestructiveClose),
      new_in_st(new_st_attr), att(a) {
  a->browser_node->edit_start();
  
  if (a->browser_node->is_writable()) {
    setOkButton(TR("OK"));
    setCancelButton(TR("Cancel"));
  }
  else {
    setOkButton(QString::null);
    setCancelButton(TR("Close"));
  }
  
  visit = !hasOkButton();
  ClassData * cld = (ClassData *) 
    ((BrowserNode *) a->browser_node->parent())->get_data();
  QString stereotype = cld->get_stereotype();
  QString lang_st;
  
  in_enum = (stereotype == "enum");
  
  lang_st = GenerationSettings::cpp_class_stereotype(stereotype);
  cpp_in_enum = in_enum || (lang_st == "enum");
  cpp_ignored = !cpp_in_enum && ((lang_st == "typedef") || (lang_st == "ignored"));
  
  lang_st = GenerationSettings::java_class_stereotype(stereotype);
  java_in_enum = in_enum || (lang_st == "enum");
  java_in_enum_pattern = !java_in_enum && (lang_st == "enum_pattern");
  java_ignored = (lang_st == "ignored");
  
  lang_st = GenerationSettings::php_class_stereotype(stereotype);
  php_in_enum = in_enum || (lang_st == "enum");
  php_ignored = !php_in_enum && (lang_st == "ignored");
  
  lang_st = GenerationSettings::python_class_stereotype(stereotype);
  python_in_enum = in_enum || (lang_st == "enum");
  python_ignored = !python_in_enum && (lang_st == "ignored");
  
  lang_st = GenerationSettings::idl_class_stereotype(stereotype);
  idl_in_enum = in_enum || (lang_st == "enum");
  idl_in_typedef = !idl_in_enum && (lang_st == "typedef");
  idl_in_struct = !idl_in_enum && ((lang_st == "struct") || (lang_st == "exception"));
  idl_in_union = !idl_in_enum && (lang_st == "union");
  
  setCaption((in_enum || java_in_enum_pattern) ? TR("Enum item dialog") : TR("Attribute dialog"));
  
  Q3Grid * grid;
  Q3HBox * htab;
  QString s;
    
  // general tab
  
  grid = new Q3Grid(2, this);
  umltab = grid;
  grid->setMargin(5);
  grid->setSpacing(5);
  
  new QLabel(TR("class : "), grid);
  new QLabel(((BrowserNode *) a->get_browser_node()->parent())->full_name(TRUE),
	     grid);
  
  new QLabel(TR("name :"), grid);
  edname = new LineEdit(a->name(), grid);
  edname->setReadOnly(visit);

  QFont font = edname->font();
  if (! hasCodec())
    font.setFamily("Courier");
  font.setFixedPitch(TRUE);
  
  if (!java_in_enum_pattern) {
    new QLabel(TR("stereotype :"), grid);
    htab = new Q3HBox(grid);
    edstereotype = new Q3ComboBox(!visit, htab);
    edstereotype->insertItem(toUnicode(a->get_stereotype()));
    if (!visit) {
      edstereotype->insertStringList(BrowserAttribute::default_stereotypes());
      edstereotype->insertStringList(ProfiledStereotypes::defaults(UmlAttribute));
      if (java_in_enum) {
	int n = edstereotype->count();
	
	for (attribute_st_rank = 0; attribute_st_rank != n; attribute_st_rank += 1)
	  if (edstereotype->text(attribute_st_rank) == "attribute")
	    break;
	     
	if (attribute_st_rank == n) {
	  edstereotype->insertItem("attribute");
	  n += 1;
	}
	
	for (empty_st_rank = 0; empty_st_rank != n; empty_st_rank += 1)
	  if (edstereotype->text(empty_st_rank).isEmpty())
	    break;
	     
	if (empty_st_rank == n)
	  edstereotype->insertItem("");
      }
      edstereotype->setAutoCompletion(completion());
    }
//.........这里部分代码省略.........
开发者ID:kralf,项目名称:bouml,代码行数:101,代码来源:AttributeDialog.cpp

示例14: QDialog


//.........这里部分代码省略.........
    //

    htab = new Q3HBox(gbox);
    //htab->setMargin(5);

    new QLabel("filter 3 : ", htab);
    filter3_le = new LineEdit(htab);

    new QLabel("  ", htab);

    bg = new Q3HButtonGroup(htab);
    bg->setRadioButtonExclusive(TRUE);

    with3_rb = new QRadioButton("with", bg);
    new QRadioButton("without", bg);
    with3_rb->setChecked(TRUE);

    //
    //

    gbox = new Q3VGroupBox("Stereotype" , this);
    vbox->addWidget(gbox);

    htab = new Q3HBox(gbox);
    //htab->setMargin(5);

    bg = new Q3HButtonGroup(htab);
    bg->setRadioButtonExclusive(TRUE);

    any_rb = new QRadioButton("any", bg);
    is_rb = new QRadioButton("is", bg);
    isnot_rb = new QRadioButton("is not", bg);
    any_rb->setChecked(TRUE);
    stereotype_le = new QLineEdit(htab);

    //
    //

    gbox = new Q3VGroupBox("Targets" , this);
    vbox->addWidget(gbox);

    htab = new Q3HBox(gbox);
    //htab->setMargin(5);

    artifact_cb = new QCheckBox("artifact", htab);
    class_cb = new QCheckBox("class", htab);
    operation_cb = new QCheckBox("operation", htab);
    attribute_cb = new QCheckBox("attribute", htab);
    relation_cb = new QCheckBox("relation", htab);

    //
    //

    gbox = new Q3VGroupBox("Languages" , this);
    vbox->addWidget(gbox);

    htab = new Q3HBox(gbox);
    //htab->setMargin(5);

    cpp_cb = new QCheckBox("C++", htab);
    java_cb = new QCheckBox("Java", htab);
    php_cb = new QCheckBox("Php", htab);
    python_cb = new QCheckBox("Python", htab);
    idl_cb = new QCheckBox("Idl", htab);

    //
    //

    Q3Grid * grid = new Q3Grid(2, this);
    vbox->addWidget(grid);
    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel("current : ", grid);
    current_le  = new LineEdit(grid);

    new QLabel("new : ", grid);
    new_le  = new LineEdit(grid);

    //
    //

    htab = new Q3HBox(this);
    htab->setMargin(5);
    vbox->addWidget(htab);

    new QLabel(htab);
    QPushButton * replace = new QPushButton("Replace", htab);
    new QLabel(htab);
    QPushButton * quit = new QPushButton("Quit", htab);
    new QLabel(htab);

    QSize bs(replace->sizeHint());

    quit->setFixedSize(bs);

    connect(replace, SIGNAL(clicked()), this, SLOT(do_replace()));
    connect(quit, SIGNAL(clicked()), this, SLOT(reject()));

}
开发者ID:02JanDal,项目名称:douml,代码行数:101,代码来源:Dialog.cpp

示例15: Q3Grid

void FlowDialog::init_tab(FlDialog & d, FlowDef & st, const char * lbl,
                          const char * sl_guard, const char * sl_selection,
                          const char * sl_transformation, bool enabled)
{
    Q3Grid * grid = new Q3Grid(2, this);
    Q3VBox * vtab;

    grid->setMargin(5);
    grid->setSpacing(5);

    new QLabel(TR("weight : "), grid);
    d.edweight = new LineEdit(grid);

    QFont font = d.edweight->font();

    if (! hasCodec())
        font.setFamily("Courier");

    font.setFixedPitch(TRUE);
    d.edweight->setFont(font);
    d.edweight->setText(st.weight);

    if (visit)
        d.edweight->setReadOnly(TRUE);

    vtab = new Q3VBox(grid);
    new QLabel(TR("guard : "), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()), this, sl_guard);

    d.edguard = new MultiLineEdit(grid);
    d.edguard->setFont(font);
    d.edguard->setText(st.guard);

    if (visit)
        d.edguard->setReadOnly(TRUE);

    vtab = new Q3VBox(grid);
    new QLabel(TR("selection : "), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()), this, sl_selection);

    d.edselection = new MultiLineEdit(grid);
    d.edselection->setFont(font);
    d.edselection->setText(st.sel_trans.first);

    if (visit)
        d.edselection->setReadOnly(TRUE);

    vtab = new Q3VBox(grid);
    new QLabel(TR("transformation : "), vtab);

    if (! visit)
        connect(new SmallPushButton(TR("Editor"), vtab), SIGNAL(clicked()), this, sl_transformation);

    d.edtransformation = new MultiLineEdit(grid);
    d.edtransformation->setFont(font);
    d.edtransformation->setText(st.sel_trans.second);

    if (visit)
        d.edtransformation->setReadOnly(TRUE);

    addTab(grid, lbl);

    if (! enabled)
        removePage(grid);
}
开发者ID:jeremysalwen,项目名称:douml,代码行数:69,代码来源:FlowDialog.cpp


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