本文整理汇总了C++中setSizeGripEnabled函数的典型用法代码示例。如果您正苦于以下问题:C++ setSizeGripEnabled函数的具体用法?C++ setSizeGripEnabled怎么用?C++ setSizeGripEnabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setSizeGripEnabled函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
}
示例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);
}
示例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();
}
示例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"));
}
示例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);
}
示例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 );
}
示例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()) );
}
示例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)));
}
示例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();
}
示例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);
}
示例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);
}
示例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()) );
}
示例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);
}
示例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));
}
示例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());
}