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


C++ Q3VBoxLayout::addWidget方法代码示例

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


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

示例1: QDialog

ConstraintDialog::ConstraintDialog(ConstraintCanvas * c)
    : QDialog(0, "ConstraintVisibilityDialog", TRUE, 0), constraint(c)
{
    setCaption(TR("Constraints visibility dialog"));

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);

    vbox->setMargin(5);

    table = new ConstraintTable(this, constraint);
    vbox->addWidget(table);
    vbox->addWidget(new QLabel(this));

    Q3HBoxLayout * hbox;

    hbox = new Q3HBoxLayout(vbox);

    cb_visible = new QCheckBox(TR("Specify visible elements rather than hidden ones"), this);
    cb_visible->setChecked(constraint->indicate_visible);
    hbox->addWidget(cb_visible);

    QPushButton * showall = new QPushButton(TR("Show all"), this);
    QPushButton * hideall = new QPushButton(TR("Hide all"), this);
    QPushButton * hideinherited = new QPushButton(TR("Hide inherited"), this);
    QSize bs = hideinherited->sizeHint();

    showall->setFixedSize(bs);
    hideall->setFixedSize(bs);
    hideinherited->setFixedSize(bs);

    hbox->addWidget(new QLabel(this));
    hbox->addWidget(showall);
    hbox->addWidget(new QLabel(this));
    hbox->addWidget(hideall);
    hbox->addWidget(new QLabel(this));
    hbox->addWidget(hideinherited);
    hbox->addWidget(new QLabel(this));

    connect(showall, SIGNAL(clicked()), this, SLOT(show_all()));
    connect(hideall, SIGNAL(clicked()), this, SLOT(hide_all()));
    connect(hideinherited, SIGNAL(clicked()), this, SLOT(hide_inherited()));

    vbox->addWidget(new QLabel(this));
    hbox = new Q3HBoxLayout(vbox);

    hbox->setMargin(5);
    QPushButton * ok = new QPushButton(TR("&OK"), this);
    QPushButton * cancel = new QPushButton(TR("&Cancel"), this);

    ok->setDefault(TRUE);
    bs = cancel->sizeHint();
    ok->setFixedSize(bs);
    cancel->setFixedSize(bs);

    hbox->addWidget(ok);
    hbox->addWidget(cancel);

    connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
    connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
}
开发者ID:harmegnies,项目名称:douml,代码行数:60,代码来源:ConstraintDialog.cpp

示例2: main

int main(int argc, char** argv)
{
    // Initialise the program
    KCmdLineArgs::init(argc, argv, "kexidbcomboboxtest", 0, KLocalizedString(), "", KLocalizedString(), true);
    KApplication* app = new KApplication(true, true);

    // Look for installed database drivers
    KDbDriverManager manager;
    KDbDriver::InfoHash drvs = manager.driversInfo();

    // Set up a combo box and a quit widget in a new container
    QWidget* vbox = new QWidget();
    Q3VBoxLayout* vbLayout = new Q3VBoxLayout(vbox);

    KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs);
    KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs,
            KexiDBDriverComboBox::ShowServerDrivers);

    QPushButton* quit = new QPushButton("Quit", vbox);

    vbLayout->addWidget(all);     // Combobox listing all drivers
    vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers
    vbLayout->addWidget(quit);

    // Show the whole lot
    QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit()));
    vbox->show();
    app->exec();

    delete app;
}
开发者ID:TheTypoMaster,项目名称:calligra,代码行数:31,代码来源:kexidbdrivercombotest.cpp

示例3: QWidget

LCDRange::LCDRange( QWidget *parent, const char *name ): QWidget( parent, name )
{
	//QLCDNumber *lcd = new QLCDNumber( 2, this,  "lcd" );
	QLCDNumber *lcd = new QLCDNumber( 2 );
	lcd->setSegmentStyle(QLCDNumber::Filled);

	//slider = new QSlider( Horizontal, this, "slider" );
	slider = new QSlider( Horizontal);
	slider->setRange( 0, 99 );
	slider->setValue( 0 );

	//设置滑块为焦点代理。当想要给LCDRange一个键盘焦点,滑块就会注意到它。
	setFocusProxy( slider );

	//这里把slider的valueChanged信号分别连接到display和自定义的valueChanged上面
	connect( slider, SIGNAL(valueChanged(int)), lcd,
			SLOT(display(int)) );

	//这里两种方式实现信号的连接,利用标准信号发出自定义信号。
	//connect( slider, SIGNAL(valueChanged(int)),
	//		SIGNAL(valueChanged(int)) );
	connect( slider, SIGNAL(valueChanged(int)), this,
			SIGNAL(valueChanged(int)) );

	//这里利用另外的方式实现添加到VBox,而不用继承QVBox类
	Q3VBoxLayout *layout = new Q3VBoxLayout;
	layout->addWidget(lcd);
	layout->addWidget(slider);
	setLayout(layout);

}
开发者ID:cherry-wb,项目名称:quietheart,代码行数:31,代码来源:lcdRange.cpp

示例4: QDialog

ConfigForm::ConfigForm(int aCurrentIntervalValue, QWidget *parent,
		       const char *name,
		       bool modal, Qt::WFlags f)
  : QDialog( parent, name, modal, f ),
    mApplyButton(kNULL), mCancelButton(kNULL)
{
  mMinVal_Sec = float(kMIN_POLLING_INT) / 1000.f;
  mMaxVal_Sec = float(kMAX_POLLING_INT) / 1000.f;

  REG_DBGMSG1("ARPDBG: min val = ", mMinVal_Sec);
  REG_DBGMSG1("ARPDBG: max val = ", mMaxVal_Sec);

  REG_DBGCON("ConfigForm");

  // note aCurrentIntervalValue is in milliseconds - convert to
  // seconds for GUI entry

  this->setCaption( "Configure Polling" );
  resize( 150, 150 );

  // create the layouts for the form
  Q3VBoxLayout *lFormLayout = new Q3VBoxLayout(this, 10, 10, "configformlayout");
  Q3HBoxLayout *lButtonLayout = new Q3HBoxLayout(6, "configbuttonlayout");

  lFormLayout->addWidget(new QLabel("Enter interval value (seconds) \n"
				    "Valid range: "
				    +QString::number(mMinVal_Sec)
				    +" - "+QString::number(mMaxVal_Sec)
				    +" (2 d.p.)", this));

  mLineEdit = new QLineEdit( this );

  double lVal = (double) aCurrentIntervalValue/1000;

  mLineEdit->setText(QString::number(lVal, 'g', 3));
  mLineEdit->setValidator( new QDoubleValidator(mLineEdit, "dbleavlidator" ) );

  lFormLayout->addWidget( mLineEdit);

  mApplyButton = new QPushButton("Apply", this, "Applybutton"); \
  mApplyButton->setAutoDefault(FALSE);
  QToolTip::add(mApplyButton, "Apply to steerer");
  connect(mApplyButton, SIGNAL(clicked()), this, SLOT(applySlot()));

  mCancelButton = new QPushButton("Cancel", this, "cancelbutton");
  mCancelButton->setAutoDefault(FALSE);
  connect(mCancelButton,  SIGNAL(clicked()), this, SLOT( reject()));

  mCancelButton->setMinimumSize(mCancelButton->sizeHint());
  mCancelButton->setMaximumSize(mCancelButton->sizeHint());
  mApplyButton->setMinimumSize(mCancelButton->sizeHint());
  mApplyButton->setMaximumSize(mApplyButton->sizeHint());

  lButtonLayout->addWidget(mApplyButton);
  lButtonLayout->addWidget(mCancelButton);

  lFormLayout->addLayout(lButtonLayout);

}
开发者ID:BlueBrain,项目名称:qt_steerer,代码行数:59,代码来源:configform.cpp

示例5: QLabel

Dialog::Dialog(BooL & rec, char & lang) : QDialog(0, 0, TRUE), _rec(rec), _lang(lang) {
  Q3VBoxLayout * vbox = new Q3VBoxLayout(this);
  Q3HBox * htab;
  
  vbox->setMargin(5);
  
  // recursive checkbox
  if (rec) {
    htab = new Q3HBox(this);
    htab->setMargin(5);
    vbox->addWidget(htab);
    
    rec_cb = new QCheckBox("Do recursively", htab);
  }
  else
    rec_cb = 0;

  // langs + cancel buttons
  
  htab = new Q3HBox(this);
  htab->setMargin(5);
  vbox->addWidget(htab);
  
  QPushButton * cpp = new QPushButton("&C++", htab);
  new QLabel(htab);
  QPushButton * java = new QPushButton("&Java", htab);
  new QLabel(htab);
  QPushButton * idl = new QPushButton("&Idl", htab);
  new QLabel(htab);
  QPushButton * php = new QPushButton("P&hp", htab);
  new QLabel(htab);
  QPushButton * python = new QPushButton("P&ython", htab);
  new QLabel(htab);
  QPushButton * cancel = new QPushButton("&Cancel", htab);
  new QLabel(htab);
  QSize bs(cancel->sizeHint());
  
  cpp->setFixedSize(bs);
  java->setFixedSize(bs);
  
  connect(cpp, SIGNAL(clicked()), this, SLOT(accept_cpp()));
  connect(java, SIGNAL(clicked()), this, SLOT(accept_java()));
  connect(idl, SIGNAL(clicked()), this, SLOT(accept_idl()));
  connect(php, SIGNAL(clicked()), this, SLOT(accept_php()));
  connect(python, SIGNAL(clicked()), this, SLOT(accept_python()));
  connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));

  // help
  
  htab = new Q3HBox(this);
  htab->setMargin(5);
  vbox->addWidget(htab);
  
  new QLabel(htab);
  new QLabel("Warning : reset the declarations/definitions to\n"
	     "their default value from the 'generation settings'", htab);
  new QLabel(htab);
}
开发者ID:SciBoy,项目名称:douml,代码行数:58,代码来源:Dialog.cpp

示例6: QWidget

TicTacToe::TicTacToe( bool meFirst, int boardSize, QWidget *parent, const char *name )
    : QWidget( parent, name )
{
    Q3VBoxLayout * l = new Q3VBoxLayout( this, 6 );

    // Create a message label

    message = new QLabel( this );
    message->setFrameStyle( Q3Frame::WinPanel | Q3Frame::Sunken );
    message->setAlignment( Qt::AlignCenter );
    l->addWidget( message );

    // Create the game board and connect the signal finished() to this
    // gameOver() slot

    board = new TicTacGameBoard( meFirst, boardSize, this );
    connect( board, SIGNAL(finished()), SLOT(gameOver()) );
    l->addWidget( board );

    // Create a horizontal frame line

    Q3Frame *line = new Q3Frame( this );
    line->setFrameStyle( Q3Frame::HLine | Q3Frame::Sunken );
    l->addWidget( line );

    // Create the combo box for deciding who should start, and
    // connect its clicked() signals to the buttonClicked() slot

    whoStarts = new QComboBox( this );
    whoStarts->insertItem( "Opponent starts" );
    whoStarts->insertItem( "You start" );
    l->addWidget( whoStarts );

	whoStarts->setEnabled(false);
	whoStarts->setCurrentIndex(meFirst); 
    // Create the push buttons and connect their clicked() signals
    // to this right slots.

	connect( board, SIGNAL(myMove(int)), this, SIGNAL(myMove(int)));
	connect( board, SIGNAL(stateChanged()), this, SLOT(newState()));
    newGame = new QPushButton( "Play!", this );
    connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) );
	newGame->setEnabled(false);
    quit = new QPushButton( "Quit", this );
    connect( quit, SIGNAL(clicked()), this, SIGNAL(closing()) );
    Q3HBoxLayout * b = new Q3HBoxLayout;
    l->addLayout( b );
    b->addWidget( newGame );
    b->addWidget( quit );

    newState();
	//board->newGame();
	newGameClicked();
}
开发者ID:AlekSi,项目名称:Jabbin,代码行数:54,代码来源:tictac.cpp

示例7: QDialog

XListDialog::XListDialog( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) :
  QDialog( parent, name, modal, fl )
{
  if ( !name )
    setName( "XListDialog" );

  Q3VBoxLayout * XListDialogLayout = new Q3VBoxLayout( this, 11, 6, "XListDialogLayout"); 

  Q3HBoxLayout * layout13 = new Q3HBoxLayout( 0, 0, 6, "layout13"); 

  _altFrame = new Q3Frame( this, "_altFrame" );
  _altFrame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, _altFrame->sizePolicy().hasHeightForWidth() ) );
  _altFrame->setFrameShape( Q3Frame::NoFrame );
  _altFrame->setFrameShadow( Q3Frame::Raised );
  layout13->addWidget( _altFrame );

  Q3VBoxLayout * layout12 = new Q3VBoxLayout( 0, 0, 6, "layout12"); 

  _close = new QPushButton( tr( "&Close" ), this, "_close" );
  _close->setAccel( QKeySequence( tr( "Alt+C" ) ) );
  layout12->addWidget( _close );

  _select = new QPushButton( tr( "&Select" ), this, "_select" );
  _select->setAccel( QKeySequence( tr( "Alt+S" ) ) );
  _select->setEnabled(FALSE);
  layout12->addWidget( _select );
  QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Minimum, QSizePolicy::Minimum );
  layout12->addItem( spacer );
  layout13->addLayout( layout12 );
  XListDialogLayout->addLayout( layout13 );

  _listLabel = new QLabel( tr( "List:" ), this, "_listLabel" );
  XListDialogLayout->addWidget( _listLabel );

  _list = new XListView( this, "_list" );
  XListDialogLayout->addWidget( _list );

  setCaption( tr( "XListDialog" ) );
  resize( QSize(420, 380).expandedTo(minimumSizeHint()) );
  //clearWState( WState_Polished );

  setTabOrder(_list, _select);
  setTabOrder(_select, _close);
  setTabOrder(_close, _list);
  _select->setFocus();

  // signals and slots connections
  connect( _close,  SIGNAL( clicked() ), this, SLOT( sClose() ) );
  connect( _select, SIGNAL( clicked() ), this, SLOT( sSelect() ) );
  connect( _list,   SIGNAL( itemSelected(int) ), _select, SLOT( animateClick() ) );
  connect( _list,   SIGNAL( valid(bool) ), _select, SLOT( setEnabled(bool) ) );
}
开发者ID:,项目名称:,代码行数:52,代码来源:

示例8: createDataPage

void StocksDialog::createDataPage ()
{
    QWidget *w = new QWidget(this);

    Q3VBoxLayout *vbox = new Q3VBoxLayout(w);
    vbox->setMargin(5);
    vbox->setSpacing(0);

    barEdit = new BarEdit(w);
    QString s = tr("Open");
    QString s2 = "Open";
    barEdit->createField(s, s2, FALSE);
    s = tr("High");
    s2 = "High";
    barEdit->createField(s, s2, FALSE);
    s = tr("Low");
    s2 = "Low";
    barEdit->createField(s, s2, FALSE);
    s = tr("Close");
    s2 = "Close";
    barEdit->createField(s, s2, FALSE);
    s = tr("Volume");
    s2 = "Volume";
    barEdit->createField(s, s2, FALSE);
    connect(barEdit, SIGNAL(signalDeleteRecord()), this, SLOT(deleteRecord()));
    connect(barEdit, SIGNAL(signalSaveRecord()), this, SLOT(saveRecord()));
    connect(barEdit, SIGNAL(signalSearch(QDateTime)), this, SLOT(slotDateSearch(QDateTime)));
    connect(barEdit, SIGNAL(signalFirstRecord()), this, SLOT(slotFirstRecord()));
    connect(barEdit, SIGNAL(signalLastRecord()), this, SLOT(slotLastRecord()));
    connect(barEdit, SIGNAL(signalPrevRecord()), this, SLOT(slotPrevRecord()));
    connect(barEdit, SIGNAL(signalNextRecord()), this, SLOT(slotNextRecord()));
    vbox->addWidget(barEdit);

    addTab(w, tr("Data"));
}
开发者ID:redrhino,项目名称:qtstalker-qt4,代码行数:35,代码来源:StocksDialog.cpp

示例9: QWidget

// -------------------------------------------------------------------------------------------------
TriggerWidget::TriggerWidget(QWidget* parent, const char* name)
throw ()
    : QWidget(parent, name)
{
    Q3VBoxLayout* boxLayout = new Q3VBoxLayout(this, 0, 0);

    Q3HBox* hbox = new Q3HBox(this);
    hbox->setSpacing(2);

    // create the checkboxes with their labels
    for (int i = 0; i < NUMBER_OF_BITS_PER_BYTE; i++) {
        Q3VBox* box = new Q3VBox(hbox);
        box->setSpacing(2);

        m_labels[i] = new QLabel(QString::number(i+1), box);
        m_labels[i]->setAlignment(Qt::AlignHCenter);

        m_checkboxes[i] = new QCheckBox(box);
        m_checkboxes[i]->setTristate(true);
        m_checkboxes[i]->setNoChange();


        connect(m_checkboxes[i], SIGNAL(stateChanged(int)), SLOT(valueChangedHandler()));
    }

    boxLayout->addWidget(hbox);
    boxLayout->addStretch(5);
}
开发者ID:BackupTheBerlios,项目名称:tfla-01-svn,代码行数:29,代码来源:triggerwidget.cpp

示例10: KDialog

RenameImagesDialog::RenameImagesDialog(const KUrl::List& images,
                                       KIPI::Interface* interface,
                                       QWidget* parent)
    : KDialog(parent)
{
    setCaption(i18n("Rename Images"));
    setModal(true);
    setButtons(Help | User1 | Close);
    setButtonText(User1, i18n("&Start"));
    setDefaultButton(Close);
    // About data and help button.

    m_about = new KIPIPlugins::KPAboutData(ki18n("Batch-rename images"),
                                           QByteArray(),
                                           KAboutData::License_GPL,
                                           ki18n("A Kipi plugin to batch-rename images"),
                                           ki18n("(c) 2003-2007, Gilles Caulier"));

    m_about->addAuthor(ki18n("Gilles Caulier"), ki18n("Author and maintainer"),
                       "caulier dot gilles at gmail dot com");

    DialogUtils::setupHelpButton(this, m_about);
    // gui

    QWidget* box = new QWidget(this);
    setMainWidget(box);
    Q3VBoxLayout* lay = new Q3VBoxLayout(box);
    m_widget = new RenameImagesWidget(box, interface, images);
    lay->addWidget(m_widget);

    connect(this, SIGNAL(user1Clicked()),
            m_widget, SLOT(slotStart()));
    
    adjustSize();
}
开发者ID:ruphy,项目名称:kipi-plugins,代码行数:35,代码来源:renameimagesdialog.cpp

示例11: setupDst

//===========================================================
//
void ImportWizard::setupDst()
{
    m_dstPage = new QWidget(this);
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_dstPage, KDialog::marginHint());

    m_dstConn = new KexiConnSelectorWidget(Kexi::connset(),
                                           "kfiledialog:///ProjectMigrationDestinationDir",
                                           KAbstractFileWidget::Saving, m_dstPage);
    m_dstConn->hideHelpers();
    //me: Can't connect m_dstConn->m_fileDlg here, it doesn't exist yet
    //connect(this, SLOT(next()), m_dstConn->m_fileDlg, SIGNAL(accepted()));

    vbox->addWidget(m_dstConn);
    connect(m_dstConn, SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
            this, SLOT(next()));

// m_dstConn->hideHelpers();
    m_dstConn->showSimpleConn();
    //anyway, db files will be _saved_
    m_dstConn->fileWidget->setMode(KexiStartupFileWidget::SavingFileBasedDB);
// m_dstConn->hideHelpers();
// m_dstConn->m_file->btn_advanced->hide();
// m_dstConn->m_file->label->hide();
// m_dstConn->m_file->lbl->hide();
    //m_dstConn->m_file->spacer7->hide();


    //js dstNewDBName = new KLineEdit(dstControls);
    //   dstNewDBName->setText(i18n("Enter new database name here"));
    addPage(m_dstPage, i18n("Select Location for Destination Database"));
}
开发者ID:JeremiasE,项目名称:KFormula,代码行数:33,代码来源:importwizard.cpp

示例12: QWidget

CColorDialog::CColorDialog (QWidget * parent, const char *name, F4lmApp * p):
        QWidget (parent, name)
{
        //QColor renk;
        //renk=QColorDialog::getColor(renk,this);
    realp = p;

    Q3VBoxLayout *topLayout = new Q3VBoxLayout (this);

    Q3ButtonGroup *ToolsButtonGroup =new Q3ButtonGroup (this, "ToolsButtonGroup");
    ToolsButtonGroup->setGeometry (QRect (150, 70, 71, 291));
    ToolsButtonGroup->setLineWidth (0);
    ToolsButtonGroup->setTitle (trUtf8 (""));

    QToolButton *ToolButton1 =new QToolButton (ToolsButtonGroup, "ToolButton1");
    ToolButton1->setGeometry (QRect (0, 10, 30, 30));
    ToolButton1->setText (trUtf8 ("CC"));
    connect (ToolButton1, SIGNAL (clicked ()), this,SLOT (slotColorChooser ()));

    QToolButton *ToolButton2 =new QToolButton (ToolsButtonGroup, "ToolButton2");
    ToolButton2->setGeometry (QRect (30, 10, 30, 30));
    ToolButton2->setText (trUtf8 ("..."));

        //CColorSwatches* s=new CColorSwatches(this,"color_swatches",p);
    topLayout->addWidget (ToolsButtonGroup);
        //topLayout->addWidget(s);
}
开发者ID:ozkanpakdil,项目名称:f4l,代码行数:27,代码来源:ccolordialog.cpp

示例13: setupIntro

//===========================================================
//
void ImportWizard::setupIntro()
{
    m_introPage = new QWidget(this);
    Q3VBoxLayout *vbox = new Q3VBoxLayout(m_introPage, KDialog::marginHint());

    QLabel *lblIntro = new QLabel(m_introPage);
    lblIntro->setAlignment(Qt::AlignTop | Qt::AlignLeft);
    lblIntro->setWordWrap(true);
    QString msg;
    if (m_predefinedConnectionData) { //predefined import: server source
        msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database "
                   "<nobr>(connection %2)</nobr> into a Kexi database.</qt>",
                   m_predefinedDatabaseName, m_predefinedConnectionData->serverInfoString());
    } else if (!m_predefinedDatabaseName.isEmpty()) { //predefined import: file source
//! @todo this message is currently ok for files only
        KMimeType::Ptr mimeTypePtr = KMimeType::mimeType(m_predefinedMimeType);
        if (mimeTypePtr.isNull())
            KexiDBWarn << QString("'%1' mimetype not installed!").arg(m_predefinedMimeType);
        msg = i18n(
                  "<qt>Database Importing wizard is about to import <nobr>\"%1\"</nobr> file "
                  "of type \"%2\" into a Kexi database.</qt>",
                  QDir::convertSeparators(m_predefinedDatabaseName), mimeTypePtr ? mimeTypePtr->comment() : "???");
    } else {
        msg = i18n("Database Importing wizard allows you to import an existing database "
                   "into a Kexi database.");
    }
    lblIntro->setText(msg + "\n\n"
                      + i18n("Click \"Next\" button to continue or \"Cancel\" button to exit this wizard."));
    vbox->addWidget(lblIntro);
    addPage(m_introPage, i18n("Welcome to the Database Importing Wizard"));
}
开发者ID:JeremiasE,项目名称:KFormula,代码行数:33,代码来源:importwizard.cpp

示例14: QDialog

ReferenceDialog::ReferenceDialog(BrowserNode * bn)
    : QDialog(0, "Referenced By dialog", FALSE, Qt::WDestructiveClose)
{
    the = this;
    target = bn;

    setCaption(TR("Referenced By dialog"));

    Q3VBoxLayout * vbox = new Q3VBoxLayout(this);

    vbox->setMargin(5);

    QString s = target->get_name();

    s += TR(" is referenced by :");

    vbox->addWidget(new QLabel(s, this));

    results = new Q3ComboBox(FALSE, this);
    vbox->addWidget(results);

    Q3HBoxLayout * hbox = new Q3HBoxLayout(vbox);
    QPushButton * search_b = new QPushButton(TR("Recompute"), this);
    QPushButton * close_b = new QPushButton(TR("Close"), this);

    hbox->setMargin(5);
    hbox->addWidget(search_b);
    hbox->addWidget(select_b = new QPushButton(TR("Select"), this));
    hbox->addWidget(mark_unmark_b = new QPushButton(TR("Unmark"), this));
    hbox->addWidget(mark_them_b = new QPushButton(TR("Mark them"), this));
    hbox->addWidget(unmark_all_b = new QPushButton(TR("Unmark all"), this));
    hbox->addWidget(close_b);

    search_b->setDefault(TRUE);

    connect(search_b, SIGNAL(clicked()), this, SLOT(compute()));
    connect(select_b, SIGNAL(clicked()), this, SLOT(select()));
    connect(close_b, SIGNAL(clicked()), this, SLOT(reject()));
    connect(mark_unmark_b, SIGNAL(clicked()), this, SLOT(mark_unmark()));
    connect(mark_them_b, SIGNAL(clicked()), this, SLOT(mark_them()));
    connect(unmark_all_b, SIGNAL(clicked()), this, SLOT(unmark_all()));
    connect(results, SIGNAL(activated(int)), this, SLOT(selected(int)));

    compute();

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

示例15: QWidget

KexiCSVInfoLabel::KexiCSVInfoLabel(const QString& labelText, QWidget* parent)
        : QWidget(parent)
{
    Q3VBoxLayout *vbox = new Q3VBoxLayout(this, 0, KDialog::spacingHint());
    Q3HBoxLayout *hbox = new Q3HBoxLayout(this);
    vbox->addLayout(hbox);
    m_leftLabel = new QLabel(labelText, this);
    m_leftLabel->setMinimumWidth(130);
    m_leftLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    m_leftLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_leftLabel->setWordWrap(true);
    hbox->addWidget(m_leftLabel);
    m_iconLbl = new QLabel(this);
    m_iconLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
    m_iconLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_fnameLbl = new QLabel(this);
    m_fnameLbl->setOpenExternalLinks(true);
    m_fnameLbl->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
    m_fnameLbl->setFocusPolicy(Qt::NoFocus);
    m_fnameLbl->setTextFormat(Qt::PlainText);
    m_fnameLbl->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 1, 0));
    m_fnameLbl->setLineWidth(1);
    m_fnameLbl->setFrameStyle(Q3Frame::Box);
    m_fnameLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_fnameLbl->setWordWrap(true);
    hbox->addSpacing(5);
    hbox->addWidget(m_iconLbl);
    hbox->addWidget(m_fnameLbl, 1, Qt::AlignVCenter | Qt::AlignLeft
#ifdef __GNUC__
#warning TODO | Qt::TextWordWrap
#else
#pragma WARNING( TODO | Qt::TextWordWrap )
#endif
                   );
    hbox->addSpacing(10);
    m_commentLbl = new QLabel(this);
    m_commentLbl->setOpenExternalLinks(true);
    m_commentLbl->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
    m_commentLbl->setFocusPolicy(Qt::NoFocus);
    m_commentLbl->setTextFormat(Qt::PlainText);
    m_commentLbl->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
    m_commentLbl->setLineWidth(1);
    m_commentLbl->setFrameStyle(QFrame::Box);
    m_commentLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
    m_commentLbl->setWordWrap(true);
    hbox->addWidget(m_commentLbl, 0, Qt::AlignVCenter | Qt::AlignRight
#ifdef __GNUC__
#warning TODO | Qt::TextWordWrap
#else
#pragma WARNING( TODO | Qt::TextWordWrap )
#endif
                   );

    m_separator = new Q3Frame(this);
    m_separator->setFrameShape(Q3Frame::HLine);
    m_separator->setFrameShadow(Q3Frame::Sunken);
    vbox->addWidget(m_separator);
}
开发者ID:JeremiasE,项目名称:KFormula,代码行数:58,代码来源:kexicsvwidgets.cpp


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