• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ setSizeGripEnabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: QDialog

DelegateConfigWrapper::DelegateConfigWrapper( QWidget* conf, const QString& title, QWidget* parent, Qt::WindowFlags flags )
    : QDialog( parent, flags )
    , m_widget( conf )
    , m_deleted( false )
{
    m_widget->setWindowFlags( Qt::Sheet );
#ifdef Q_WS_MAC
    m_widget->setVisible( true );
#endif
    setWindowTitle( title );
    QVBoxLayout* v = new QVBoxLayout( this );
    v->setContentsMargins( 0, 0, 0, 0 );
    v->addWidget( m_widget );

    m_buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
    m_okButton = m_buttons->button( QDialogButtonBox::Ok );
    connect( m_buttons, SIGNAL( clicked( QAbstractButton*)  ), this, SLOT( closed( QAbstractButton* ) ) );
    connect( this, SIGNAL( rejected() ), this, SLOT( rejected() ) );
    v->addWidget( m_buttons );

    setLayout( v );

#ifdef Q_WS_MAC
    setSizeGripEnabled( false );
    setMinimumSize( sizeHint() );
    setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way

    if( conf->metaObject()->indexOfSignal( "sizeHintChanged()" ) > -1 )
        connect( conf, SIGNAL( sizeHintChanged() ), this, SLOT( updateSizeHint() ) );
#else
    m_widget->setVisible( true );
#endif

}
开发者ID:MechanisM,项目名称:tomahawk,代码行数:34,代码来源:delegateconfigwrapper.cpp


示例2: QWizard

MatDBAboutDialog::MatDBAboutDialog(QWidget *parent) :
    QWizard(parent)
{
#ifdef Q_WS_MAC
    this->setParent(qApp->focusWidget());
    this->setWindowModality(Qt::WindowModal);
    this->setWindowFlags(Qt::Sheet);
    setWizardStyle(ModernStyle);
#endif
    setFixedWidth(900);
    setFixedHeight(450);

    setSizeGripEnabled(false);

    setPage(Page_Version, new VersionPage);
    setPage(Page_License, new LicensePage);

    setStartId(Page_Version);

    QList<QWizard::WizardButton> layout;
    layout << QWizard::Stretch << QWizard::FinishButton << QWizard::NextButton;
    setButtonLayout(layout);

    QPixmap pix(":/artwork/MatDBAbout.png");
    setPixmap(QWizard::WatermarkPixmap, pix);
    setPixmap(QWizard::LogoPixmap, pix);
    setPixmap(QWizard::BannerPixmap, pix);
    setPixmap(QWizard::BackgroundPixmap, pix);
}
开发者ID:Negusbuk,项目名称:MatDB,代码行数:29,代码来源:matdbaboutdialog.cpp


示例3: QDialog

fitDialog::fitDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
        setName( "fitDialog" );
    setCaption(tr("QtiPlot - Non-linear curve fit"));
    setSizeGripEnabled( true );

    tw = new QWidgetStack( this, "tw" );
    tw->setSizePolicy(QSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred, 2, 0, FALSE ));
    initEditPage();
    initFitPage();

    tw->addWidget(editPage, 0);
    tw->addWidget(fitPage, 1);

    QVBoxLayout* hlayout = new QVBoxLayout(this, 5, 5, "hlayout");
    hlayout->addWidget(tw);

    setBuiltInFunctionNames();
    setBuiltInFunctions();

    categoryBox->setCurrentItem(2);
    funcBox->setCurrentItem(0);

    loadPlugins();
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:27,代码来源:fitDialog.cpp


示例4: QWidget

void QPreviewFileDialog::initDlg()
{
  ImageIOSupporter iisup;
  QStringList filters;
  QString qs;
  if(mPreviewMode)
  {
    QWidget* widget = new QWidget(this);
    QVBoxLayout* qvbl = new QVBoxLayout(widget);
    mpPreviewCheckBox = new QCheckBox(tr("Show preview"),widget);
    connect(mpPreviewCheckBox,SIGNAL(toggled(bool)),
            this,SLOT(slotShowPreview(bool)));
    mpPixWidget = new QLabel(widget);
    mpPixWidget->setMinimumWidth(200);
    qvbl->setMargin(5);
    qvbl->addWidget(mpPreviewCheckBox);
    qvbl->addWidget(mpPixWidget);
    qvbl->setStretchFactor (mpPixWidget,1);
    mpPixWidget->setPalette(QColor(lightGray));
    addLeftWidget(widget);
    resize(550,300);
  }
  mImageFormat =xmlConfig->stringValue("VIEWER_IMAGE_TYPE","ALL_FILES");
  filters = iisup.getOrderedOutFilterList(mImageFormat);
  setDir(xmlConfig->stringValue("SINGLEFILE_SAVE_PATH"));
  setFilters(filters);
  setMode(QFileDialog::AnyFile);
  setSizeGripEnabled(false);
  setViewMode((QFileDialog::ViewMode)xmlConfig->intValue("SINGLEFILE_VIEW_MODE"));
}
开发者ID:arunjalota,项目名称:paperman,代码行数:30,代码来源:qpreviewfiledialog.cpp


示例5: QMessageBox

HelpMessageBox::HelpMessageBox(QWidget *parent) :
    QMessageBox(parent)
{
    header = tr("HappyCoin-Qt") + " " + tr("version") + " " +
        QString::fromStdString(FormatFullVersion()) + "\n\n" +
        tr("Usage:") + "\n" +
        "  HappyCoin-qt [" + tr("command-line options") + "]                     " + "\n";

    coreOptions = QString::fromStdString(HelpMessage());

    uiOptions = tr("UI options") + ":\n" +
        "  -lang=<lang>           " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
        "  -min                   " + tr("Start minimized") + "\n" +
        "  -splash                " + tr("Show splash screen on startup (default: 1)") + "\n";

    setWindowTitle(tr("HappyCoin-Qt"));
    setFont(bitcoinAddressFont());
    setTextFormat(Qt::PlainText);
    // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider.
    setText(header + QString(QChar(0x2003)).repeated(50));
    setDetailedText(coreOptions + "\n" + uiOptions);
    addButton("OK", QMessageBox::RejectRole);   //кнопка OK будет справа от кнопки "Скрыть подробности"
    //addButton("OK", QMessageBox::NoRole);     //кнопка OK будет слева от кнопки "Скрыть подробности"
    setMouseTracking(true);
    setSizeGripEnabled(true);   
}
开发者ID:happycoinmaster,项目名称:Happycoin,代码行数:26,代码来源:guiutil.cpp


示例6: QDialog

/*
 *  Constructs a dlgOptions as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
dlgOptions::dlgOptions( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "dlgOptions" );
    setSizeGripEnabled( TRUE );
    dlgOptionsLayout = new QGridLayout( this, 1, 1, 5, 5, "dlgOptionsLayout"); 

    Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5"); 

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout5->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout5->addWidget( buttonCancel );

    buttonHelp = new QPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( TRUE );
    Layout5->addWidget( buttonHelp );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout5->addItem( Spacer1 );

    dlgOptionsLayout->addMultiCellLayout( Layout5, 0, 1, 1, 1 );

    LineEdit1 = new QLineEdit( this, "LineEdit1" );
    LineEdit1->setMinimumSize( QSize( 0, 70 ) );
    LineEdit1->setPaletteBackgroundColor( QColor( 220, 220, 220 ) );
    LineEdit1->setFocusPolicy( QLineEdit::NoFocus );
    LineEdit1->setAlignment( int( QLineEdit::AlignAuto ) );
    LineEdit1->setReadOnly( TRUE );

    dlgOptionsLayout->addWidget( LineEdit1, 1, 0 );

    taProps = new QTable( this, "taProps" );
    taProps->setNumCols( taProps->numCols() + 1 );
    taProps->horizontalHeader()->setLabel( taProps->numCols() - 1, tr( "Property" ) );
    taProps->setNumCols( taProps->numCols() + 1 );
    taProps->horizontalHeader()->setLabel( taProps->numCols() - 1, tr( "Value" ) );
    taProps->setNumRows( 0 );
    taProps->setNumCols( 2 );
    taProps->setSorting( FALSE );
    taProps->setSelectionMode( QTable::SingleRow );

    dlgOptionsLayout->addWidget( taProps, 0, 0 );
    languageChange();
    resize( QSize(322, 384).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, buttonHelp );
    setTabOrder( buttonHelp, LineEdit1 );
}
开发者ID:Miguel-J,项目名称:eneboo-core,代码行数:67,代码来源:dlgoptions.cpp


示例7: QDialog

SymbolDialog::SymbolDialog(CharSet charSet, QWidget* parent, Qt::WFlags fl )
    : QDialog( parent, fl )
{
    setAttribute(Qt::WA_DeleteOnClose);
    setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
    setSizeGripEnabled( false );

    buttons = new QButtonGroup(this);
    mainLayout = new QVBoxLayout(this);
    gridLayout = new QGridLayout();

    if (charSet == SymbolDialog::lowerGreek)
        initLowerGreekChars();
    else if (charSet == SymbolDialog::upperGreek)
        initUpperGreekChars();
    else if (charSet == SymbolDialog::mathSymbols)
        initMathSymbols();
    else if (charSet == SymbolDialog::arrowSymbols)
        initArrowSymbols();
    else
        initNumberSymbols();

    closeButton = new QPushButton(tr("&Close"), this);

    mainLayout->addLayout( gridLayout );
    mainLayout->addStretch();
    mainLayout->addWidget( closeButton );

    languageChange();

    connect(buttons, SIGNAL(buttonClicked(int)), this, SLOT(getChar(int)));
    connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
    QShortcut *shortcut = new QShortcut(Qt::Key_Return, this);
    connect( shortcut , SIGNAL(activated()), this, SLOT(addCurrentChar()) );
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:35,代码来源:SymbolDialog.cpp


示例8: QDialog

polynomFitDialog::polynomFitDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "polynomFitDialog" );
	setCaption(tr("QtiPlot - Polynomial Fit Options"));
    setSizeGripEnabled(true);
	setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
	
	GroupBox1 = new QButtonGroup( 2,QGroupBox::Horizontal,tr(""),this,"GroupBox1" );
	GroupBox1->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
	
	new QLabel( tr("Polynomial Fit of"), GroupBox1, "TextLabel1",0 );
	boxName = new QComboBox(GroupBox1, "boxShow" );
	
	new QLabel( tr("Order (1 - 9, 1 = linear)"), GroupBox1, "TextLabel2",0 );
	boxOrder = new QSpinBox(1,9,1,GroupBox1, "boxOrder" );
	boxOrder->setValue(2);
	
	new QLabel( tr("Fit curve # pts"), GroupBox1, "TextLabel3",0 );
	boxPoints = new QSpinBox(1,1000,50,GroupBox1, "boxPoints" );
	
	new QLabel( tr("Fit curve Xmin"), GroupBox1, "TextLabel4",0 );
	boxStart = new QLineEdit(GroupBox1, "boxStart" );
	boxStart->setText(tr("0"));
	
	new QLabel( tr("Fit curve Xmax"), GroupBox1, "TextLabel5",0 );
	boxEnd = new QLineEdit(GroupBox1, "boxEnd" );

	new QLabel( tr("Color"), GroupBox1, "TextLabel52",0 );
	boxColor = new ColorBox( FALSE, GroupBox1);
	boxColor->setColor(QColor(red));

	new QLabel( tr( "Show Formula on Graph?" ), GroupBox1, "TextLabel6",0 );
    boxShowFormula = new QCheckBox(GroupBox1, "boxShow" );
    boxShowFormula->setChecked( FALSE );
	
	GroupBox2 = new QButtonGroup(1,QGroupBox::Horizontal,tr(""),this,"GroupBox2" );
	GroupBox2->setFlat (TRUE);
	GroupBox2->setLineWidth (0);

	buttonFit = new QPushButton(GroupBox2, "buttonFit" );
    buttonFit->setAutoDefault( TRUE );
    buttonFit->setDefault( TRUE );
   
    buttonCancel = new QPushButton(GroupBox2, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
	
	QHBoxLayout* hlayout = new QHBoxLayout(this,5,5, "hlayout");
    hlayout->addWidget(GroupBox1);
	hlayout->addWidget(GroupBox2);

    languageChange();
	setMaximumHeight(GroupBox1->height());
   
    // signals and slots connections
	connect( buttonFit, SIGNAL( clicked() ), this, SLOT( fit() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
	connect( boxName, SIGNAL( activated(int) ), this, SLOT(activateCurve(int)));
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:60,代码来源:polynomFitDialog.cpp


示例9: QDialog

	//--
	Dialog::Dialog() :
	QDialog(0, Qt::Dialog | Qt::WindowMinimizeButtonHint),
	m_thread(NULL),
	m_display_color(NULL),
	m_display_depth(NULL),
	m_ui(new Ui::Dialog()),
	m_kinect_initialized(false),
	m_kinect_angle(0),
	m_color_next_frame_event(NULL),
	m_depth_next_frame_event(NULL),
	m_color_stream_handle(NULL),
	m_depth_stream_handle(NULL)
	{
		// [rad] Setup ui for this dialog.
		setupUi();

		setWindowTitle(tr("Kinect Demo 02: Camera"));

		// [rad] Disable resizing.
		setSizeGripEnabled(false);
		setFixedSize(width(), height());

		// [rad] Initialize kinect.
		kinectInitialize();
	}
开发者ID:019949,项目名称:kinect,代码行数:26,代码来源:dialog.cpp


示例10: setFont

QedStatusBar::QedStatusBar()
{
    QFont *font = QedApp::globalFont();

    setFont(*font);
    setFixedHeight(buttonSize());
    setSizeGripEnabled(false);

    my.timeButton = new QedTimeButton(this);
    my.timeButton->setFixedSize(QSize(buttonSize(), buttonSize()));
    my.timeButton->setWhatsThis(QApplication::translate("PmChart",
	"VCR state button, also used to display the time control window.",
	0, QApplication::UnicodeUTF8));
    my.timeFrame = new QToolButton(this);
    my.timeFrame->setMinimumSize(QSize(buttonSize(), buttonSize()));
    my.timeFrame->setSizePolicy(
			QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    my.timeFrame->setWhatsThis(QApplication::translate("PmChart",
	"Unified time axis, displaying the current time position at the "
	"rightmost point, and either status information or the timeframe "
	"covering all Visible Points to the left",
	0, QApplication::UnicodeUTF8));

    delete layout();
    QHBoxLayout *box = new QHBoxLayout;
    box->setMargin(0);
    box->setSpacing(1);
    box->addWidget(my.timeButton);
    box->addWidget(my.timeFrame);
    setLayout(box);

    my.gadgetLabel = new QLabel(my.timeFrame);
    my.gadgetLabel->setFont(*font);
    my.gadgetLabel->hide();	// shown with gadget Views

    my.dateLabel = new QLabel(my.timeFrame);
    my.dateLabel->setIndent(8);
    my.dateLabel->setFont(*font);
    my.dateLabel->setAlignment(Qt::AlignRight | Qt::AlignBottom);

    my.labelSpacer = new QSpacerItem(10, 0,
				QSizePolicy::Fixed, QSizePolicy::Minimum);
    my.rightSpacer = new QSpacerItem(0, 0,
				QSizePolicy::Fixed, QSizePolicy::Minimum);

    my.valueLabel = new QLabel(my.timeFrame);
    my.valueLabel->setIndent(8);
    my.valueLabel->setFont(*font);
    my.valueLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom);

    my.grid = new QGridLayout;	// Grid of [5 x 3] cells
    my.grid->setMargin(0);
    my.grid->setSpacing(0);
    my.grid->addWidget(my.gadgetLabel, 0, 0, 1, 3);
    my.grid->addWidget(my.dateLabel, 2, 2, 1, 1);  // bottom row, last two cols
    my.grid->addItem(my.labelSpacer, 2, 1, 1, 1);  // bottom row, second column
    my.grid->addWidget(my.valueLabel, 2, 0, 1, 1); // bottom row, first column.
    my.grid->addItem(my.rightSpacer, 0, 4, 2, 1);  // all rows, in final column
    my.timeFrame->setLayout(my.grid);
}
开发者ID:Aconex,项目名称:pcp,代码行数:60,代码来源:qed_statusbar.cpp


示例11: QDialog

PrivateChatDialog::PrivateChatDialog(QWidget * parent)
    : QDialog(parent)
{
    m_name_w = new QLineEdit;

    m_owner_w = new QLineEdit;
    m_owner_w->setReadOnly(true);

    QListView * listView = new QListView;
    listView->setModel(&m_model);

    QFormLayout * formLayout = new QFormLayout;
    formLayout->addRow(tr("&Name : "), m_name_w);
    formLayout->addRow(tr("&Owner : "), m_owner_w);
    formLayout->addRow(tr("&Player : "), listView);

    m_buttonBox = new QDialogButtonBox;
    connect(m_buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
    connect(m_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));

    QVBoxLayout * mainLayout = new QVBoxLayout;
    mainLayout->addLayout(formLayout);
    mainLayout->addWidget(m_buttonBox);

    setLayout(mainLayout);

    setSizeGripEnabled(true);
}
开发者ID:hfiguiere,项目名称:rolisteam,代码行数:28,代码来源:privatechatdialog.cpp


示例12: QDialog

symbolDialog::symbolDialog(CharSet charsSet, QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "symbolDialog" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( FALSE );

	GroupBox1 = new QButtonGroup(5, QGroupBox::Horizontal,tr(""), this,"GroupBox1" );
	GroupBox1->setFlat ( true );
	GroupBox1->setLineWidth ( 0 );
	GroupBox1->moveFocus (0);

	if (!charsSet)
		initMinGreekChars();
	else
		initMajGreekChars();

	QHBoxLayout* hlayout = new QHBoxLayout(this, 0, 0, "hlayout2");
    hlayout->addWidget(GroupBox1);

    languageChange();

	connect (GroupBox1, SIGNAL(clicked(int)), this, SLOT(getChar(int)));

	QAccel *accel = new QAccel(this);
	accel->connectItem( accel->insertItem( Key_Return ),
                            this, SLOT(addCurrentChar()) );
}
开发者ID:BackupTheBerlios,项目名称:qtiplot-svn,代码行数:29,代码来源:symbolDialog.cpp


示例13: QDialog

GenericArrayWidget<S>::GenericArrayWidget(
    QString name,
    QString type,
    const RCP<const ParameterEntryValidator> validator,
    QWidget *parent):
    QDialog(parent),
    type(type),
    name(name),
    entryValidator(validator)
{
    setModal(true);
    setSizeGripEnabled(true);
    arrayContainer = new QWidget(this);

    QScrollArea *scrollArea = new QScrollArea(this);
    scrollArea->setWidget(arrayContainer);
    scrollArea->setWidgetResizable(true);

    QPushButton *doneButton = new QPushButton(tr("Done"));
    QPushButton *cancelButton = new QPushButton(tr("Cancel"));
    connect(doneButton, SIGNAL(clicked(bool)), this, SLOT(accept()));
    connect(cancelButton, SIGNAL(clicked(bool)), this, SLOT(reject()));
    QGridLayout *layout = new QGridLayout(this);
    layout->addWidget(scrollArea,0,0,1,3);
    layout->addWidget(doneButton,1,2);
    layout->addWidget(cancelButton,1,1);

    this->setLayout(layout);

    setWindowTitle(name);
}
开发者ID:00liujj,项目名称:trilinos,代码行数:31,代码来源:Optika_ArrayWidget.hpp


示例14: QDialog

ApplyChangesWidget::ApplyChangesWidget(QWidget* parent)
    : QDialog(parent), d(new ApplyChangesWidgetPrivate(this))
{
    setSizeGripEnabled(true);

    auto buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
    auto mainLayout = new QVBoxLayout(this);
    auto okButton = buttonBox->button(QDialogButtonBox::Ok);
    okButton->setDefault(true);
    okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
    connect(buttonBox, &QDialogButtonBox::accepted, this, &ApplyChangesWidget::accept);
    connect(buttonBox, &QDialogButtonBox::rejected, this, &ApplyChangesWidget::reject);

    QWidget* w=new QWidget(this);
    d->m_info=new QLabel(w);
    d->m_documentTabs = new QTabWidget(w);
    connect(d->m_documentTabs, &QTabWidget::currentChanged,
            this, &ApplyChangesWidget::indexChanged);

    QVBoxLayout* l = new QVBoxLayout(w);
    l->addWidget(d->m_info);
    l->addWidget(d->m_documentTabs);

    mainLayout->addWidget(w);
    mainLayout->addWidget(buttonBox);

    resize(QSize(800, 400));
}
开发者ID:KDE,项目名称:kdevplatform,代码行数:28,代码来源:applychangeswidget.cpp


示例15: QDialog

AboutDialog::AboutDialog(QWidget *parent)
	: QDialog(parent)
{
	QGridLayout* grid = new QGridLayout;

	QPushButton* ok = new QPushButton("Ok", this);
	ok->setDefault(true);
	QString s;
	s = QCoreApplication::organizationName();
	s += "\n";
	s += QCoreApplication::applicationName();
	s += " version: ";
	s += QCoreApplication::applicationVersion();

	QLabel* label = new QLabel(s);
	grid->addWidget(label, 0, 0, 1, 2, Qt::AlignLeft);

	grid->addWidget(ok, 1, 1,Qt::AlignRight|Qt::AlignBottom);

	setLayout(grid);

	connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
	setSizeGripEnabled(true);
	resize(minimumSizeHint());
}
开发者ID:OGMalin,项目名称:PolarChess,代码行数:25,代码来源:AboutDialog.cpp


示例16: QDialog

MessageHelpBox::MessageHelpBox( QWidget *parent, QString title ) :
  QDialog(parent)
{
  setWindowTitle( title );
  setModal( true );
  //setAttribute( Qt::WA_DeleteOnClose );
  setSizeGripEnabled( true );

  QGridLayout * grid = new QGridLayout(this);

  QLabel *icon = new QLabel(this);
  icon->setPixmap(QMessageBox::standardIcon(QMessageBox::Information));
  icon->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
  grid->addWidget(icon, 0, 0, Qt::AlignTop);

  m_display = new QTextEdit(this);
  m_display->setReadOnly( true );
  grid->addWidget(m_display, 0, 1);

  m_showAgain = new QCheckBox(this);
  m_showAgain->setChecked(true);
  m_showAgain->setText(tr("&Show this message again"));
  grid->addWidget(m_showAgain, 1, 1, Qt::AlignTop);

  QPushButton *ok = new QPushButton(this);
  ok->setText(tr("&OK"));
  ok->setFocus();

  grid->addWidget(ok, 2, 0, 1, 2, Qt::AlignCenter);
  grid->setColumnStretch(1, 42);
  grid->setRowStretch(0, 42);

  connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
}
开发者ID:Exadios,项目名称:KFLog,代码行数:34,代码来源:MessageHelpBox.cpp


示例17: QDialog

Trashdialog::Trashdialog(QWidget *parent) : QDialog(parent)
{
    setSizeGripEnabled(true);
    setWindowModality(Qt::WindowModal);
    read_settings();
    init();
}
开发者ID:iggy,项目名称:antico,代码行数:7,代码来源:trashdialog.cpp


示例18: QDialog

PasswordDialog::PasswordDialog(QWidget* parent)
: QDialog(parent)
{
  QGridLayout* gridLayout = new QGridLayout();

  QLabel* userNameLabel = new QLabel(QString("Username:"), this);
  m_userNameLineEdit = new QLineEdit(this);

  QLabel* passwordLabel = new QLabel(QString("Password:"), this);
  m_passwordLineEdit = new QLineEdit(this);
  m_passwordLineEdit->setEchoMode(QLineEdit::Password);
  
  QHBoxLayout* buttonLayout = new QHBoxLayout();

  QPushButton* okButton = new QPushButton(QString("OK"));
  okButton->setDefault(true);
  QPushButton* cancelButton = new QPushButton(QString("Cancel"));
  
  buttonLayout->addWidget(okButton);
  buttonLayout->addWidget(cancelButton);

  gridLayout->addWidget(userNameLabel, 0, 0);
  gridLayout->addWidget(m_userNameLineEdit, 0, 1);
  gridLayout->addWidget(passwordLabel, 1, 0);
  gridLayout->addWidget(m_passwordLineEdit, 1, 1);
  gridLayout->addLayout(buttonLayout, 2, 0, 1, 0);

  setLayout(gridLayout);
  setWindowTitle(QString("Enter password"));
  setSizeGripEnabled(false);
  adjustSize();

  connect(okButton, SIGNAL(released()), this, SLOT(accept()));
  connect(cancelButton, SIGNAL(released()), this, SLOT(reject()));
}
开发者ID:pgeorges,项目名称:PGBrowser,代码行数:35,代码来源:PasswordDialog.cpp


示例19: QDialog

FitDialog::FitDialog( QWidget* parent, Qt::WFlags fl )
: QDialog( parent, fl )
{
	setWindowTitle(tr("Fit Wizard"));
	setSizeGripEnabled( true );

    d_user_function_names = QStringList();
    d_user_functions = QStringList();
    d_user_function_params = QStringList();

	d_fitter = 0;

	tw = new QStackedWidget();

	initEditPage();
	initFitPage();
	initAdvancedPage();

	QVBoxLayout* vl = new QVBoxLayout();
	vl->addWidget(tw);
    setLayout(vl);

	setBuiltInFunctionNames();
	setBuiltInFunctions();

	categoryBox->setCurrentRow (2);
	funcBox->setCurrentRow (0);

	loadPlugins();
}
开发者ID:rgonzga,项目名称:scidavis,代码行数:30,代码来源:FitDialog.cpp


示例20: QProgressDialog

// Subclass QProgressDialog()
MyQProgressDialog::MyQProgressDialog(LPCSTR titleText, LPCSTR labelText, LPCSTR styleSheet, LPCSTR icon) : 
QProgressDialog(labelText, CANCEL, 0, 100, QApplication::activeWindow(), 0), m_isCanceled(FALSE), m_indeterminateMode(FALSE), m_lastProgress(-1),
m_hMouseHook(NULL), m_hWinHook(NULL), m_hTimerQueue(NULL), m_hUpdateTimer(NULL)
{    
    setWindowTitle(titleText);
    setAutoReset(FALSE);
    setAutoClose(FALSE);
    setWindowModality(Qt::WindowModal);
    setFixedSize(DAILOG_WIDTH, DAILOG_HEIGHT);
    setSizeGripEnabled(FALSE);

    // Qt::Tool      -- Smaller title bar with smaller 'X'
    // Qt::Popup     -- Boarderless
    // Qt::SubWindow -- Nonmodal on top with no background
    //setWindowFlags(Qt::Tool);
    // Nix the title bar help button
    setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) | Qt::WindowMinimizeButtonHint);
       
    // This time must elapse before dialog shows (default 4sec)
    setMinimumDuration(SHOW_DELAY);

    // Set dialog font (and children inherit)
    QFont fnt(FONT, 10, QFont::Normal);
    fnt.setStyleStrategy(QFont::PreferAntialias);
    setFont(fnt);

    // Put the progress text in the middle
    if (QProgressBar *bar = findChild<QProgressBar *>())            
        bar->setAlignment(Qt::AlignCenter);    

    // Optionally set Qt style sheet
    if (styleSheet && styleSheet[0])
    {
        // From a file?
        if (strncmp(styleSheet, "url(", 4) == 0)
        {
            QString fn(styleSheet + (sizeof("url(") - 1));
            fn.chop(1);

            QFile f(fn);
            if (f.open(QFile::ReadOnly | QFile::Text))
                setStyleSheet(QTextStream(&f).readAll());
        }
        else
            // No, string
            setStyleSheet(styleSheet);
    }

    // Optionally set titlebar icon
    if (icon && icon[0])
        setWindowIcon(QIcon(icon));   

    // Progress 0 for the control to setup internally
    setValue(0);

    // Start update interval timer    
    if (m_hTimerQueue = CreateTimerQueue())
        CreateTimerQueueTimer(&m_hUpdateTimer, m_hTimerQueue, (WAITORTIMERCALLBACK)timerTick, NULL, TARGET_UPDATE_MS, TARGET_UPDATE_MS, 0);
    _ASSERT(m_hUpdateTimer != NULL);
}
开发者ID:andyvand,项目名称:IDA_WaitBoxEx,代码行数:61,代码来源:WaitBoxEx.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ setSizePolicy函数代码示例发布时间:2022-05-30
下一篇:
C++ setSize函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap