本文整理汇总了C++中setMinimumHeight函数的典型用法代码示例。如果您正苦于以下问题:C++ setMinimumHeight函数的具体用法?C++ setMinimumHeight怎么用?C++ setMinimumHeight使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setMinimumHeight函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QDialog
ListReports::ListReports(const QString &filter,const QString &type_filter,
const QString &group,const QString &schedcode,
QWidget *parent)
: QDialog(parent,"",true)
{
list_filter=filter;
list_type_filter=type_filter;
list_group=group;
list_schedcode=schedcode;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
setCaption(tr("RDLibrary Reports"));
//
// Create Fonts
//
QFont font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
//
// Reports List
//
list_reports_box=new QComboBox(this);
list_reports_box->setGeometry(50,10,sizeHint().width()-60,19);
list_reports_box->insertItem(tr("Cart Report"));
list_reports_box->insertItem(tr("Cut Report"));
list_reports_box->insertItem(tr("Cart Data Dump (fixed width)"));
list_reports_box->insertItem(tr("Cart Data Dump (CSV)"));
list_reports_label=new QLabel(list_reports_box,tr("Type:"),this);
list_reports_label->setGeometry(10,10,35,19);
list_reports_label->setFont(font);
list_reports_label->setAlignment(AlignRight|AlignVCenter|ShowPrefix);
connect(list_reports_box,SIGNAL(activated(int)),
this,SLOT(typeActivatedData(int)));
//
// Field Names Checkbox
//
list_fieldnames_check=new QCheckBox(this);
list_fieldnames_check->setGeometry(55,34,15,15);
list_fieldnames_check->setChecked(true);
list_fieldnames_check->setDisabled(true);
list_fieldnames_label=
new QLabel(list_fieldnames_check,tr("Prepend Field Names"),this);
list_fieldnames_label->setGeometry(75,32,sizeHint().width()-75,19);
list_fieldnames_label->setFont(font);
list_fieldnames_label->setAlignment(AlignLeft|AlignVCenter|ShowPrefix);
list_fieldnames_label->setDisabled(true);
//
// Generate Button
//
QPushButton *generate_button=new QPushButton(this);
generate_button->
setGeometry(sizeHint().width()-180,sizeHint().height()-60,80,50);
generate_button->setDefault(true);
generate_button->setFont(font);
generate_button->setText(tr("&Generate"));
connect(generate_button,SIGNAL(clicked()),this,SLOT(generateData()));
//
// Close Button
//
QPushButton *close_button=new QPushButton(this);
close_button->setGeometry(sizeHint().width()-90,sizeHint().height()-60,
80,50);
close_button->setFont(font);
close_button->setText(tr("&Close"));
connect(close_button,SIGNAL(clicked()),this,SLOT(closeData()));
}
开发者ID:radio-helsinki-graz,项目名称:rivendell,代码行数:77,代码来源:list_reports.cpp
示例2: QDialog
TestImport::TestImport(RDSvc *svc,RDSvc::ImportSource src,QWidget *parent,
const char *name)
: QDialog(parent,name,true)
{
QString sql;
QDate current_date=QDate::currentDate();
test_svc=svc;
test_src=src;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
switch(test_src) {
case RDSvc::Traffic:
setCaption(tr("Test Traffic Import"));
break;
case RDSvc::Music:
setCaption(tr("Test Music Import"));
break;
case RDSvc::NoSource:
break;
}
//
// Create Fonts
//
QFont font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
QFont section_font=QFont("Helvetica",14,QFont::Bold);
section_font.setPixelSize(14);
//
// Date Selector
//
test_date_edit=new QDateEdit(this,"test_date_edit");
test_date_label=new QLabel(test_date_edit,tr("Test Date:"),this);
test_date_label->setFont(font);
test_date_label->setAlignment(AlignVCenter|AlignRight);
test_date_edit->setDate(current_date);
connect(test_date_edit,SIGNAL(valueChanged(const QDate &)),
this,SLOT(dateChangedData(const QDate &)));
//
// Select Date Button
//
test_select_button=new QPushButton(this);
test_select_button->setFont(font);
test_select_button->setText(tr("&Select"));
connect(test_select_button,SIGNAL(clicked()),this,SLOT(selectData()));
//
// Import Button
//
test_import_button=new QPushButton(this);
test_import_button->setFont(font);
test_import_button->setText(tr("&Import"));
connect(test_import_button,SIGNAL(clicked()),this,SLOT(importData()));
//
// Import Filename
//
test_filename_edit=new QLineEdit(this);
test_filename_edit->setReadOnly(true);
test_filename_label=
new QLabel(test_filename_edit,tr("Using source file:"),this);
test_filename_label->setFont(font);
//
// Events List
//
test_events_list=new RDListView(this);
test_events_list->setItemMargin(2);
test_events_list->addColumn(tr("Start Time"));
test_events_list->setColumnAlignment(0,AlignCenter);
test_events_list->addColumn(tr("Cart"));
test_events_list->setColumnAlignment(1,AlignCenter);
test_events_list->addColumn(tr("Len"));
test_events_list->setColumnAlignment(2,AlignRight);
test_events_list->addColumn(tr("Title"));
test_events_list->setColumnAlignment(3,AlignLeft);
test_events_list->addColumn(tr("Trans"));
test_events_list->setColumnAlignment(4,AlignCenter);
test_events_list->addColumn(tr("Time Type"));
test_events_list->setColumnAlignment(5,AlignCenter);
test_events_list->addColumn(tr("Wait Time"));
test_events_list->setColumnAlignment(6,AlignCenter);
test_events_list->addColumn(tr("Contract #"));
test_events_list->setColumnAlignment(7,AlignCenter);
test_events_list->addColumn(tr("Event ID"));
test_events_list->setColumnAlignment(8,AlignCenter);
test_events_list->addColumn(tr("Announcement Type"));
test_events_list->setColumnAlignment(9,AlignCenter);
test_events_list->setColumnSortType(0,RDListView::LineSort);
test_events_label=new QLabel(test_events_list,tr("Imported Events"),this);
//.........这里部分代码省略.........
开发者ID:bpm1992,项目名称:rivendell,代码行数:101,代码来源:test_import.cpp
示例3: setMinimumHeight
void SAGraphicsTitleBarButton::setFixedHeight(qreal height)
{
setMinimumHeight(height);
setMaximumHeight(height);
}
开发者ID:lynx-r1,项目名称:Slavo-Arian-Calendar,代码行数:5,代码来源:sagraphicstitlebarbutton.cpp
示例4: QWidget
StartupView::StartupView( QWidget * parent )
: QWidget( parent )
{
m_templateListModel = std::shared_ptr<TemplateListModel>( new TemplateListModel() );
setStyleSheet("openstudio--StartupView { background: #E6E6E6; }");
#ifdef Q_OS_MAC
setWindowFlags(Qt::FramelessWindowHint);
#else
setWindowFlags(Qt::CustomizeWindowHint);
#endif
auto recentProjectsView = new QWidget();
recentProjectsView->setStyleSheet("QWidget { background: #F2F2F2; }");
auto recentProjectsLayout = new QVBoxLayout();
recentProjectsLayout->setContentsMargins(10,10,10,10);
QLabel * recentProjectsLabel = new QLabel("Recent Projects");
recentProjectsLabel->setStyleSheet("QLabel { font: bold }");
recentProjectsLayout->addWidget(recentProjectsLabel,0,Qt::AlignTop);
recentProjectsView->setLayout(recentProjectsLayout);
auto openButton = new QToolButton();
openButton->setText("Open File");
openButton->setStyleSheet("QToolButton { font: bold; }");
openButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QIcon openIcon(":/images/open_file.png");
openButton->setIcon(openIcon);
openButton->setIconSize(QSize(40,40));
connect(openButton, &QToolButton::clicked, this, &StartupView::openClicked);
auto importButton = new QToolButton();
importButton->setText("Import Idf");
importButton->setStyleSheet("QToolButton { font: bold; }");
importButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QIcon importIcon(":/images/import_file.png");
importButton->setIcon(importIcon);
importButton->setIconSize(QSize(40,40));
connect(importButton, &QToolButton::clicked, this, &StartupView::importClicked);
/*
QToolButton * importSDDButton = new QToolButton();
importSDDButton->setText("Import SDD");
importSDDButton->setStyleSheet("QToolButton { font: bold; }");
importSDDButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
QIcon importSDDIcon(":/images/import_file.png");
importSDDButton->setIcon(importSDDIcon);
importSDDButton->setIconSize(QSize(40,40));
connect(importSDDButton, &QToolButton::clicked, this, &StartupView::importSDDClicked);
*/
auto projectChooserView = new QWidget();
projectChooserView->setFixedWidth(238);
projectChooserView->setStyleSheet("QWidget { background: #F2F2F2; }");
auto projectChooserLayout = new QVBoxLayout();
projectChooserLayout->setContentsMargins(10,10,10,10);
QLabel * projectChooserLabel = new QLabel("Create New From Template");
projectChooserLabel->setStyleSheet("QLabel { font: bold }");
projectChooserLayout->addWidget(projectChooserLabel,0,Qt::AlignTop);
m_listView = new QListView();
m_listView->setViewMode(QListView::IconMode);
m_listView->setModel(m_templateListModel.get());
m_listView->setFocusPolicy(Qt::NoFocus);
m_listView->setFlow(QListView::LeftToRight);
m_listView->setUniformItemSizes(true);
m_listView->setSelectionMode(QAbstractItemView::SingleSelection);
projectChooserLayout->addWidget(m_listView);
projectChooserView->setLayout(projectChooserLayout);
m_projectDetailView = new QWidget();
m_projectDetailView->setStyleSheet("QWidget { background: #F2F2F2; }");
auto projectDetailLayout = new QVBoxLayout();
projectDetailLayout->setContentsMargins(10,10,10,10);
m_projectDetailView->setLayout(projectDetailLayout);
auto footerView = new QWidget();
footerView->setObjectName("FooterView");
footerView->setStyleSheet("QWidget#FooterView { background: #E6E6E6; }");
footerView->setMaximumHeight(50);
footerView->setMinimumHeight(50);
auto cancelButton = new QPushButton();
cancelButton->setObjectName("StandardGrayButton");
cancelButton->setMinimumSize(QSize(99,28));
#ifdef OPENSTUDIO_PLUGIN
cancelButton->setText("Cancel");
connect(cancelButton, &QPushButton::clicked, this, &StartupView::hide);
#else
#ifdef Q_OS_MAC
cancelButton->setText("Quit");
#else
cancelButton->setText("Exit");
#endif
connect(cancelButton, &QPushButton::clicked, OpenStudioApp::instance(), &OpenStudioApp::quit);
#endif
cancelButton->setStyleSheet("QPushButton { font: bold; }");
auto chooseButton = new QPushButton();
chooseButton->setObjectName("StandardBlueButton");
chooseButton->setText("Choose");
chooseButton->setMinimumSize(QSize(99,28));
connect(chooseButton, &QPushButton::clicked, this, &StartupView::newFromTemplateSlot);
chooseButton->setStyleSheet("QPushButton { font: bold; }");
//.........这里部分代码省略.........
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:101,代码来源:StartupView.cpp
示例5: setWindowTitle
void TwoDPanelDlg::SetupLayout()
{
setWindowTitle(tr("Global Panel Refinement"));
QGridLayout *pInputDataLayout = new QGridLayout;
{
QLabel *l1 = new QLabel(tr("Number of Panels"));
QLabel *l2 = new QLabel(tr("Panel Bunching Parameter"));
QLabel *l3 = new QLabel(tr("TE/LE Panel Density Ratio"));
QLabel *l4 = new QLabel(tr("Refined area/LE Panel Density Ratio"));
QLabel *l5 = new QLabel(tr("Top Side Refined Area x/c limits"));
QLabel *l6 = new QLabel(tr("Bottom Side Refined Area x/c limits"));
pInputDataLayout->addWidget(l1,1,1);
pInputDataLayout->addWidget(l2,2,1);
pInputDataLayout->addWidget(l3,3,1);
pInputDataLayout->addWidget(l4,4,1);
pInputDataLayout->addWidget(l5,5,1);
pInputDataLayout->addWidget(l6,6,1);
m_pctrlNPanels = new IntEdit(100, this);
m_pctrlNPanels->SetMax(IQX);
m_pctrlCVpar = new DoubleEdit;
m_pctrlCTErat = new DoubleEdit;
m_pctrlCTRrat = new DoubleEdit;
m_pctrlXsRef1 = new DoubleEdit;
m_pctrlXsRef2 = new DoubleEdit;
m_pctrlXpRef1 = new DoubleEdit;
m_pctrlXpRef2 = new DoubleEdit;
pInputDataLayout->addWidget(m_pctrlNPanels, 1, 2);
pInputDataLayout->addWidget(m_pctrlCVpar, 2, 2);
pInputDataLayout->addWidget(m_pctrlCTErat, 3, 2);
pInputDataLayout->addWidget(m_pctrlCTRrat, 4, 2);
pInputDataLayout->addWidget(m_pctrlXsRef1, 5, 2);
pInputDataLayout->addWidget(m_pctrlXsRef2, 5, 3);
pInputDataLayout->addWidget(m_pctrlXpRef1, 6, 2);
pInputDataLayout->addWidget(m_pctrlXpRef2, 6, 3);
connect(m_pctrlNPanels, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlCVpar, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlCTErat, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlCTRrat, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlXsRef1, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlXsRef2, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlXpRef1, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
connect(m_pctrlXpRef2, SIGNAL(editingFinished()), this, SLOT(OnChanged()));
}
QHBoxLayout *pCommandButtonsLayout = new QHBoxLayout;
{
OKButton = new QPushButton(tr("OK"));
CancelButton = new QPushButton(tr("Cancel"));
ApplyButton = new QPushButton(tr("Apply"));
pCommandButtonsLayout->addStretch(1);
pCommandButtonsLayout->addWidget(ApplyButton);
pCommandButtonsLayout->addStretch(1);
pCommandButtonsLayout->addWidget(OKButton);
pCommandButtonsLayout->addStretch(1);
pCommandButtonsLayout->addWidget(CancelButton);
pCommandButtonsLayout->addStretch(1);
}
QVBoxLayout *pmainLayout = new QVBoxLayout;
{
pmainLayout->addStretch(1);
pmainLayout->addLayout(pInputDataLayout);
pmainLayout->addStretch(1);
pmainLayout->addLayout(pCommandButtonsLayout);
pmainLayout->addStretch(1);
setLayout(pmainLayout);
}
connect(ApplyButton, SIGNAL(clicked()),this, SLOT(OnApply()));
connect(OKButton, SIGNAL(clicked()),this, SLOT(OnOK()));
connect(CancelButton, SIGNAL(clicked()), this, SLOT(reject()));
setMinimumHeight(250);
}
开发者ID:subprotocol,项目名称:xflr5,代码行数:80,代码来源:TwoDPanelDlg.cpp
示例6: QDialog
DownloadRepoDialog::DownloadRepoDialog(const Account& account,
const ServerRepo& repo,
const QString& password,
QWidget *parent)
: QDialog(parent),
repo_(repo),
account_(account),
has_manual_merge_mode_(seafApplet->settingsManager()->isEnableSyncingWithExistingFolder())
{
manual_merge_mode_ = false;
setupUi(this);
if (!repo.isSubfolder()) {
setWindowTitle(tr("Sync library \"%1\"").arg(repo_.name));
}
else {
setWindowTitle(tr("Sync folder \"%1\"").arg(repo.parent_path));
}
mDirectory->setPlaceholderText(getOperatingText(repo_));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
mRepoIcon->setPixmap(repo.getPixmap());
mRepoName->setText(repo_.name);
mOperationText->setText(tr("Sync to folder:"));
if (repo_.encrypted) {
if (!password.isEmpty()) {
mPassword->setText(password);
mPassword->setReadOnly(true);
}
mPassword->setVisible(true);
mPasswordLabel->setVisible(true);
} else {
mPassword->setVisible(false);
mPasswordLabel->setVisible(false);
}
int height = 250;
#if defined(Q_OS_MAC)
layout()->setContentsMargins(8, 9, 9, 5);
layout()->setSpacing(6);
verticalLayout_3->setSpacing(6);
#endif
if (repo.encrypted) {
height += 100;
}
setMinimumHeight(height);
setMaximumHeight(height);
setDirectoryText(seafApplet->configurator()->worktreeDir());
if (!has_manual_merge_mode_) {
mMergeHint->setText(tr("If a sub-folder with same name exists, its contents will be merged."));
mSwitchToSyncFrame->hide();
} else {
connect(mSwitchModeHint, SIGNAL(linkActivated(const QString &)),
this, SLOT(switchMode()));
updateSyncMode();
mMergeHint->hide();
}
connect(mChooseDirBtn, SIGNAL(clicked()), this, SLOT(chooseDirAction()));
connect(mOkBtn, SIGNAL(clicked()), this, SLOT(onOkBtnClicked()));
}
开发者ID:Geosparc,项目名称:seafile-client,代码行数:65,代码来源:download-repo-dialog.cpp
示例7: QDialog
EditUser::EditUser(QString lname,QWidget *parent,const char *name)
: QDialog(parent,name,true)
{
edit_loginname=lname;
edit_password_changed=false;
DvtUser *user=new DvtUser(lname);
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumWidth(sizeHint().width());
setMaximumHeight(sizeHint().height());
setCaption("Davit - Edit User");
//
// Create Fonts
//
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont font=QFont("Helvetica",12,QFont::Normal);
font.setPixelSize(12);
QFont section_font=QFont("Helvetica",10,QFont::Bold);
section_font.setPixelSize(10);
QFont small_font=QFont("Helvetica",10,QFont::Normal);
font.setPixelSize(10);
//
// User Name
//
edit_loginname_edit=new QLineEdit(this,"edit_loginname_edit");
edit_loginname_edit->setGeometry(120,10,80,20);
edit_loginname_edit->setFont(font);
edit_loginname_edit->setReadOnly(true);
edit_loginname_edit->setText(user->name());
QLabel *label=
new QLabel(edit_loginname_edit,"User Name:",this,"edit_loginname_label");
label->setGeometry(10,10,105,20);
label->setAlignment(AlignRight|AlignVCenter);
label->setFont(label_font);
//
// Full Name
//
edit_fullname_edit=new QLineEdit(this,"edit_fullname_edit");
edit_fullname_edit->setGeometry(120,32,sizeHint().width()-130,20);
edit_fullname_edit->setFont(font);
edit_fullname_edit->setMaxLength(64);
edit_fullname_edit->setText(user->fullName());
label=new QLabel(edit_fullname_edit,"Full Name:",this,"edit_fullname_label");
label->setGeometry(10,32,105,20);
label->setAlignment(AlignRight|AlignVCenter);
label->setFont(label_font);
//
// Description
//
edit_description_edit=new QLineEdit(this,"edit_description_edit");
edit_description_edit->setGeometry(120,54,sizeHint().width()-130,20);
edit_description_edit->setFont(font);
edit_description_edit->setMaxLength(64);
edit_description_edit->setText(user->description());
label=new QLabel(edit_description_edit,"Description:",
this,"edit_description_label");
label->setGeometry(10,54,105,20);
label->setAlignment(AlignRight|AlignVCenter);
label->setFont(label_font);
//
// Email
//
edit_email_edit=new QLineEdit(this,"edit_email_edit");
edit_email_edit->setGeometry(120,76,sizeHint().width()-130,20);
edit_email_edit->setFont(font);
edit_email_edit->setMaxLength(64);
edit_email_edit->setText(user->email());
label=new QLabel(edit_email_edit,"E-Mail Address:",
this,"edit_email_label");
label->setGeometry(10,76,105,20);
label->setAlignment(AlignRight|AlignVCenter);
label->setFont(label_font);
//
// Phone Number
//
edit_phone_edit=new QLineEdit(this,"edit_phone_edit");
edit_phone_edit->setGeometry(120,98,120,20);
edit_phone_edit->setFont(font);
edit_phone_edit->setMaxLength(14);
edit_phone_edit->setText(DvtFormatPhoneNumber(user->phoneNumber()));
label=new QLabel(edit_phone_edit,"Phone Number:",this,"edit_phone_label");
label->setGeometry(10,98,105,20);
label->setAlignment(AlignRight|AlignVCenter);
label->setFont(label_font);
//
// Change Password Button
//
//.........这里部分代码省略.........
开发者ID:ElvishArtisan,项目名称:davit,代码行数:101,代码来源:edit_user.cpp
示例8: setMinimumWidth
MainWidget::MainWidget(QWidget *parent,const char *name)
:QWidget(parent,name)
{
QPixmap *pm;
QPainter *pd;
QPixmap *mainmap;
//
// Fix the Window Size
//
#ifndef RESIZABLE
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
#endif // RESIZABLE
//
// Load the command-line arguments
//
RDCmdSwitch *cmd=new RDCmdSwitch(qApp->argc(),qApp->argv(),"rdpanel",
RDPANEL_USAGE);
//
// Generate Fonts
//
QFont button_font=QFont("Helvetica",16,QFont::Bold);
button_font.setPixelSize(16);
//
// Create Icons
//
lib_rivendell_map=new QPixmap(rivendell_xpm);
setIcon(*lib_rivendell_map);
//
// Ensure that system daemons are running
//
RDInitializeDaemons();
//
// Load Local Configs
//
panel_config=new RDConfig();
panel_config->load();
//
// Open Database
//
panel_db=QSqlDatabase::addDatabase("QMYSQL3");
if(!panel_db) {
QMessageBox::warning(this,
"Can't Connect","Unable to connect to mySQL Server!",0,1,1);
exit(0);
}
panel_db->setDatabaseName(panel_config->mysqlDbname());
panel_db->setUserName(panel_config->mysqlUsername());
panel_db->setPassword(panel_config->mysqlPassword());
panel_db->setHostName(panel_config->mysqlHostname());
if(!panel_db->open()) {
QMessageBox::warning(this,
"Can't Connect","Unable to connect to mySQL Server!");
panel_db->removeDatabase(panel_config->mysqlDbname());
exit(0);
}
new RDDbHeartbeat(panel_config->mysqlHeartbeatInterval(),this);
//
// Master Clock Timer
//
panel_master_timer=new QTimer(this,"panel_master_timer");
connect(panel_master_timer,SIGNAL(timeout()),this,SLOT(masterTimerData()));
panel_master_timer->start(MASTER_TIMER_INTERVAL);
//
// CAE Connection
//
panel_cae=new RDCae(parent,name);
panel_cae->connectHost("localhost",CAED_TCP_PORT,panel_config->password());
//
// Allocate Global Resources
//
rdstation_conf=new RDStation(panel_config->stationName());
rdairplay_conf=new RDAirPlayConf(panel_config->stationName(),0,"RDPANEL");
panel_skin_pixmap=new QPixmap(rdairplay_conf->skinPath());
if(panel_skin_pixmap->isNull()||(panel_skin_pixmap->width()<1024)||
(panel_skin_pixmap->height()<738)) {
delete panel_skin_pixmap;
panel_skin_pixmap=NULL;
}
else {
setErasePixmap(*panel_skin_pixmap);
}
//
// RIPC Connection
//
rdripc=new RDRipc(panel_config->stationName());
connect(rdripc,SIGNAL(userChanged()),this,SLOT(userData()));
//.........这里部分代码省略.........
开发者ID:stgabmp,项目名称:Rivendell,代码行数:101,代码来源:rdpanel.cpp
示例9: QHBoxLayout
//.........这里部分代码省略.........
m_compassMagnitude = getFixedPanel("0");
dataLayout = new QHBoxLayout();
dataLayout->addSpacing(30);
dataLayout->addWidget(m_compassMagnitude);
dataLayout->setAlignment(Qt::AlignLeft);
vLayout->addLayout(dataLayout);
vLayout->addSpacing(10);
vLayout->addWidget(new QLabel("Pressure (hPa), height above sea level (m): "));
m_pressure = getFixedPanel("0");
m_height = getFixedPanel("0");
dataLayout = new QHBoxLayout();
dataLayout->addSpacing(30);
dataLayout->addWidget(m_pressure);
dataLayout->addWidget(m_height);
dataLayout->setAlignment(Qt::AlignLeft);
vLayout->addLayout(dataLayout);
vLayout->addSpacing(10);
vLayout->addWidget(new QLabel("Temperature (C): "));
m_temperature = getFixedPanel("0");
dataLayout = new QHBoxLayout();
dataLayout->addSpacing(30);
dataLayout->addWidget(m_temperature);
dataLayout->setAlignment(Qt::AlignLeft);
vLayout->addLayout(dataLayout);
vLayout->addSpacing(10);
vLayout->addWidget(new QLabel("Humidity (RH): "));
m_humidity = getFixedPanel("0");
dataLayout = new QHBoxLayout();
dataLayout->addSpacing(30);
dataLayout->addWidget(m_humidity);
dataLayout->setAlignment(Qt::AlignLeft);
vLayout->addLayout(dataLayout);
vLayout->addSpacing(10);
QHBoxLayout *fusionBox = new QHBoxLayout();
QLabel *fusionTypeLabel = new QLabel("Fusion algorithm: ");
fusionBox->addWidget(fusionTypeLabel);
fusionTypeLabel->setMaximumWidth(150);
m_fusionType = new QLabel();
fusionBox->addWidget(m_fusionType);
vLayout->addLayout(fusionBox);
vLayout->addSpacing(10);
vLayout->addWidget(new QLabel("Fusion controls: "));
m_enableGyro = new QCheckBox("Enable gyros");
m_enableGyro->setChecked(true);
vLayout->addWidget(m_enableGyro);
m_enableAccel = new QCheckBox("Enable accels");
m_enableAccel->setChecked(true);
vLayout->addWidget(m_enableAccel);
m_enableCompass = new QCheckBox("Enable compass");
m_enableCompass->setChecked(true);
vLayout->addWidget(m_enableCompass);
m_enableDebug = new QCheckBox("Enable debug messages");
m_enableDebug->setChecked(false);
vLayout->addWidget(m_enableDebug);
vLayout->addStretch(1);
mainLayout->addLayout(vLayout);
vLayout = new QVBoxLayout();
vLayout->setContentsMargins(3, 3, 3, 3);
vLayout->setSpacing(3);
QHBoxLayout *displayLayout = new QHBoxLayout();
QLabel *displayLabel = new QLabel("Display type: ");
displayLayout->addWidget(displayLabel);
displayLayout->setAlignment(displayLabel, Qt::AlignRight);
m_displaySelect = new QComboBox();
m_displaySelect->addItem("Fusion pose", DISPLAY_FUSION);
m_displaySelect->addItem("Measured pose", DISPLAY_MEASURED);
m_displaySelect->addItem("Accels only", DISPLAY_ACCELONLY);
m_displaySelect->addItem("Compass only", DISPLAY_COMPASSONLY);
displayLayout->addWidget(m_displaySelect);
vLayout->addLayout(displayLayout);
m_view = new IMUView(this);
vLayout->addWidget(m_view);
mainLayout->addLayout(vLayout, 1);
centralWidget()->setLayout(mainLayout);
setMinimumWidth(1000);
setMinimumHeight(700);
}
开发者ID:ARMK-embedded,项目名称:RTIMULib,代码行数:101,代码来源:RTIMULibDemoGL.cpp
示例10: QDialog
ImportTrack::ImportTrack(QString *filter,QString *group,QWidget *parent)
: QDialog(parent,"",true,Qt::WStyle_Customize|Qt::WStyle_DialogBorder)
{
setCaption("");
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
//
// Generate Fonts
//
QFont button_font=QFont("Helvetica",12,QFont::Bold);
button_font.setPixelSize(12);
QFont label_font=QFont("Helvetica",12,QFont::Bold);
label_font.setPixelSize(12);
QFont day_font=QFont("Helvetica",12,QFont::Normal);
day_font.setPixelSize(12);
add_filter=filter;
add_group=group;
//
// Title Label
//
QLabel *label=new QLabel(tr("Insert audio from a:"),this);
label->setGeometry(0,0,sizeHint().width(),30);
label->setFont(label_font);
label->setAlignment(Qt::AlignCenter);
//
// Cart Button
//
QPushButton *button=new QPushButton(this);
button->setGeometry(10,30,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Cart"));
button->setDisabled(true);
QString sql=QString("select CHANNEL from DECKS where ")+
"(CARD_NUMBER>=0)&&"+
"(CHANNEL>0)&&"+
"(CHANNEL<=9)";
RDSqlQuery *q=new RDSqlQuery(sql);
if(q->first()) {
button->setEnabled(true);
}
delete q;
connect(button,SIGNAL(clicked()),this,SLOT(cartData()));
//
// Import Button
//
button=new QPushButton(this);
button->setGeometry(10,80,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&File"));
button->setDisabled(true);
sql=QString("select CHANNEL from DECKS where ")+
"(CARD_NUMBER>=0)&&"+
"(CHANNEL>128)&&"+
"(CHANNEL<=137)";
q=new RDSqlQuery(sql);
if(q->first()) {
button->setEnabled(true);
}
delete q;
connect(button,SIGNAL(clicked()),this,SLOT(importData()));
//
// Cancel Button
//
button=new QPushButton(this);
button->setGeometry(10,140,sizeHint().width()-20,50);
button->setFont(button_font);
button->setText(tr("&Cancel"));
button->setDefault(true);
connect(button,SIGNAL(clicked()),this,SLOT(cancelData()));
}
开发者ID:WMFO,项目名称:rivendell,代码行数:82,代码来源:import_track.cpp
示例11: QDialog
RDAudioSettingsDialog::RDAudioSettingsDialog(RDAudioSettings *settings,
bool mpeg,QWidget *parent)
: QDialog(parent,"",true)
{
lib_lib=settings;
//
// Dialog Name
//
setCaption(tr("Edit Settings"));
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
//
// Generate Fonts
//
QFont font=QFont("Helvetica",12,QFont::Normal);
font.setPixelSize(12);
QFont button_font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
//
// Default Format
//
lib_format_box=new QComboBox(this,"lib_name_edit");
lib_format_box->setGeometry(150,10,150,20);
lib_format_box->setFont(font);
connect(lib_format_box,SIGNAL(activated(int)),this,SLOT(formatData(int)));
QLabel *lib_format_label=new QLabel(lib_format_box,tr("Default &Format:"),
this,"lib_format_label");
lib_format_label->setGeometry(25,10,120,20);
lib_format_label->setFont(font);
lib_format_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
//
// Default Channels
//
lib_channels_box=new QComboBox(this,"lib_name_edit");
lib_channels_box->setGeometry(150,32,60,20);
lib_channels_box->setFont(font);
QLabel *lib_channels_label=new QLabel(lib_channels_box,
tr("Default &Channels:"),
this,"lib_channels_label");
lib_channels_label->setGeometry(25,32,120,20);
lib_channels_label->setFont(font);
lib_channels_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
//
// Default Sample Rate
//
lib_samprate_box=new QComboBox(this,"lib_name_edit");
lib_samprate_box->setGeometry(150,54,100,20);
lib_samprate_box->setFont(font);
QLabel *lib_samprate_label=
new QLabel(lib_samprate_box,tr("Default &Sample Rate:"),this,
"lib_samprate_label");
lib_samprate_label->setGeometry(20,54,125,20);
lib_samprate_label->setFont(font);
lib_samprate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
//
// Default Bitrate
//
lib_bitrate_box=new QComboBox(this,"lib_name_edit");
lib_bitrate_box->setGeometry(150,76,100,20);
lib_bitrate_box->setFont(font);
QLabel *lib_bitrate_label=
new QLabel(lib_bitrate_box,tr("Default &Bitrate:"),this,
"lib_bitrate_label");
lib_bitrate_label->setGeometry(25,76,120,20);
lib_bitrate_label->setFont(font);
lib_bitrate_label->setAlignment(Qt::AlignRight|Qt::AlignVCenter|Qt::TextShowMnemonic);
//
// Ok Button
//
QPushButton *ok_button=new QPushButton(this,"ok_button");
ok_button->setGeometry(145,108,80,50);
ok_button->setDefault(true);
ok_button->setFont(button_font);
ok_button->setText(tr("&OK"));
connect(ok_button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
QPushButton *cancel_button=new QPushButton(this,"cancel_button");
cancel_button->setGeometry(235,108,80,50);
cancel_button->setFont(button_font);
cancel_button->setText(tr("&Cancel"));
connect(cancel_button,SIGNAL(clicked()),this,SLOT(cancelData()));
//
// Populate Fields
//.........这里部分代码省略.........
开发者ID:ElvishArtisan,项目名称:rivendell,代码行数:101,代码来源:rdaudiosettings_dialog.cpp
示例12: QMainWindow
//.........这里部分代码省略.........
//
QFont font("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
QFont label_font("Helvetica",18,QFont::Bold);
label_font.setPixelSize(18);
setCaption(QString("RDSoftKeys")+" v"+VERSION);
//
// Create And Set Icon
//
key_icon_map=new QPixmap(rivendell_xpm);
setIcon(*key_icon_map);
//
// RML Send Socket
//
key_socket=new QSocketDevice(QSocketDevice::Datagram);
//
// Create Buttons
//
QPushButton *button;
QString rmlcmd;
int n=0;
QString color_name;
QColor color;
QString str1;
QString str2;
int h=0;
int s=0;
int v=0;
QSignalMapper *mapper=new QSignalMapper(this);
connect(mapper,SIGNAL(mapped(int)),this,SLOT(buttonData(int)));
RDProfile *profile=new RDProfile();
profile->setSource(map_filename);
key_columns=
profile->intValue("SoftKeys","Columns",RDSOFTKEYS_DEFAULT_COLUMNS);
unsigned col=0;
unsigned row=0;
while(!(rmlcmd=profile->stringValue("SoftKeys",QString().
sprintf("Command%d",n+1),"")).isEmpty()) {
for(unsigned i=0;i<rmlcmd.length();i++) {
if(rmlcmd.at(i)==':') {
key_macros.push_back(rmlcmd.right(rmlcmd.length()-(i+1)));
key_addrs.push_back(rmlcmd.left(i));
button=new QPushButton(this);
button->setGeometry(10+90*col,10+60*row,80,50);
button->
setText(WrapText(button,profile->
stringValue("SoftKeys",QString().
sprintf("Legend%d",n+1),
QString().sprintf("Button %d",n+1))));
if(!(color_name=profile->stringValue("SoftKeys",
QString().sprintf("Color%d",n+1),"")).
isEmpty()) {
color=QColor(color_name);
QPalette pal=QPalette(color,backgroundColor());
color.getHsv(&h,&s,&v);
if((h>180)&&(h<300)) {
v=255;
}
else {
if(v<168) {
v=255;
}
else {
v=0;
}
}
s=0;
color.setHsv(h,s,v);
pal.setColor(QPalette::Active,QColorGroup::ButtonText,color);
pal.setColor(QPalette::Inactive,QColorGroup::ButtonText,color);
button->setPalette(pal);
}
mapper->setMapping(button,n);
connect(button,SIGNAL(clicked()),mapper,SLOT(map()));
if(++col==key_columns) {
col=0;
row++;
key_ysize+=60;
}
}
}
n++;
}
if((key_macros.size()%key_columns)==0) {
key_ysize-=60;
}
//
// Set Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
}
开发者ID:WMTH,项目名称:rivendell,代码行数:101,代码来源:rdsoftkeys.cpp
示例13: QDialog
ListEvents::ListEvents(QString *eventname,QWidget *parent)
: QDialog(parent,"",true)
{
QStringList services_list;
QString str1=tr("Log Events - User: ");
setCaption(QString().sprintf("%s%s",(const char *)str1,
(const char *)rda->ripc()->user()));
edit_eventname=eventname;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
//
// Create Fonts
//
QFont bold_font=QFont("Helvetica",12,QFont::Bold);
bold_font.setPixelSize(12);
QFont font=QFont("Helvetica",12,QFont::Normal);
font.setPixelSize(12);
//
// Event Filter
//
edit_filter_box=new QComboBox(this);
edit_filter_label=new QLabel(edit_filter_box,tr("Filter:"),this);
edit_filter_label->setGeometry(10,10,50,20);
edit_filter_label->setFont(bold_font);
edit_filter_label->setAlignment(AlignRight|AlignVCenter);
connect(edit_filter_box,SIGNAL(activated(int)),
this,SLOT(filterActivatedData(int)));
//
// Events List
//
edit_events_list=new QListView(this);
edit_events_list->setAllColumnsShowFocus(true);
edit_events_list->setItemMargin(5);
edit_events_list->addColumn(tr("Name"));
edit_events_list->addColumn(tr("Properties"));
edit_events_list->addColumn(tr("Color"));
edit_events_list->setColumnAlignment(2,AlignCenter);
connect(edit_events_list,
SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),
this,SLOT(doubleClickedData(QListViewItem *,const QPoint &,int)));
//
// Add Button
//
edit_add_button=new QPushButton(this);
edit_add_button->setFont(bold_font);
edit_add_button->setText(tr("&Add"));
connect(edit_add_button,SIGNAL(clicked()),this,SLOT(addData()));
//
// Edit Button
//
edit_edit_button=new QPushButton(this);
edit_edit_button->setFont(bold_font);
edit_edit_button->setText(tr("&Edit"));
connect(edit_edit_button,SIGNAL(clicked()),this,SLOT(editData()));
//
// Delete Button
//
edit_delete_button=new QPushButton(this);
edit_delete_button->setFont(bold_font);
edit_delete_button->setText(tr("&Delete"));
connect(edit_delete_button,SIGNAL(clicked()),this,SLOT(deleteData()));
//
// Rename Button
//
edit_rename_button=new QPushButton(this);
edit_rename_button->setFont(bold_font);
edit_rename_button->setText(tr("&Rename"));
connect(edit_rename_button,SIGNAL(clicked()),this,SLOT(renameData()));
//
// Close Button
//
edit_close_button=new QPushButton(this);
edit_close_button->setFont(bold_font);
edit_close_button->setText(tr("&OK"));
connect(edit_close_button,SIGNAL(clicked()),this,SLOT(closeData()));
//
// Ok Button
//
edit_ok_button=new QPushButton(this);
edit_ok_button->setFont(bold_font);
edit_ok_button->setText(tr("&Ok"));
connect(edit_ok_button,SIGNAL(clicked()),this,SLOT(okData()));
//
// Cancel Button
//
edit_cancel_button=new QPushButton(this);
//.........这里部分代码省略.........
开发者ID:radio-helsinki-graz,项目名称:rivendell,代码行数:101,代码来源:list_events.cpp
示例14: QDialog
EditDropbox::EditDropbox(int id,bool duplicate,QWidget *parent)
: QDialog(parent)
{
setModal(true);
QString sql;
RDSqlQuery *q;
//
// Fix the Window Size
//
setMinimumWidth(sizeHint().width());
setMaximumWidth(sizeHint().width());
setMinimumHeight(sizeHint().height());
setMaximumHeight(sizeHint().height());
box_dropbox=new RDDropbox(id);
setWindowTitle("RDAdmin - "+tr("Dropbox Configuration")+" ["+
tr("ID")+QString().sprintf(": %d]",id));
//
// Create Fonts
//
QFont normal_font=QFont("Helvetica",12,QFont::Normal);
normal_font.setPixelSize(12);
QFont font=QFont("Helvetica",12,QFont::Bold);
font.setPixelSize(12);
//
// Dialogs
//
box_schedcodes_dialog=new RDSchedCodesDialog(this);
//
// Group Name
//
box_group_name_box=new QComboBox(this);
box_group_name_box->setGeometry(120,10,100,20);
QLabel *label=new QLabel(box_group_name_box,tr("Default Group:"),this);
label->setGeometry(10,10,105,20);
label->setFont(font);
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
//
// Path
//
box_path_edit=new QLineEdit(this);
box_path_edit->setGeometry(120,32,sizeHint().width()-190,19);
box_path_edit->setMaxLength(255);
label=new QLabel(box_path_edit,tr("&Path Spec:"),this);
label->setGeometry(10,32,105,19);
label->setFont(font);
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
QPushButton *button=
new QPushButton(tr("Select"),this);
button->setGeometry(sizeHint().width()-60,30,50,23);
button->setFont(normal_font);
connect(button,SIGNAL(clicked()),this,SLOT(selectPathData()));
//
// To Cart
//
box_to_cart_edit=new QLineEdit(this);
box_to_cart_edit->setGeometry(120,54,60,19);
box_to_cart_edit->setValidator(new QIntValidator(1,999999,this));
box_to_cart_edit->setMaxLength(6);
label=new QLabel(box_to_cart_edit,tr("To &Cart:"),this);
label->setGeometry(10,54,105,19);
label->setFont(font);
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
box_select_cart_button=
new QPushButton(tr("Select"),this);
box_select_cart_button->setGeometry(190,52,50,23);
box_select_cart_button->setFont(normal_font);
connect(box_select_cart_button,SIGNAL(clicked()),
this,SLOT(selectCartData()));
//
// Delete Cuts
//
box_delete_cuts_box=new QCheckBox(this);
box_delete_cuts_box->setGeometry(260,56,15,15);
box_delete_cuts_label=
new QLabel(box_delete_cuts_box,tr("Delete cuts before importing"),this);
box_delete_cuts_label->setGeometry(280,54,sizeHint().width()-150,20);
box_delete_cuts_label->setFont(font);
box_delete_cuts_label->setAlignment(Qt::AlignLeft|Qt::AlignVCenter);
//
// Metadata Format
//
box_metadata_pattern_edit=new QLineEdit(this);
box_metadata_pattern_edit->setGeometry(120,76,sizeHint().width()-170,19);
box_metadata_pattern_edit->setMaxLength(64);
label=new QLabel(box_metadata_pattern_edit,tr("&Metadata Pattern:"),this);
label->setGeometry(10,76,105,19);
label->setFont(font);
label->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
//.........这里部分代码省略.........
开发者ID:ElvishArtisan,项目名称:rivendell,代码行数:101,代码来源:edit_dropbox.cpp
示例15: setMaximumWidth
/**
* \brief Update the maximum width
*/
void UBRightPalette::updateMaxWidth()
{
setMaximumWidth((int)(parentWidget()->width() * 0.45));
setMaximumHeight(parentWidget()->height());
setMinimumHeight(parentWidget()->height());
}
开发者ID:KubaO,项目名称:Sankore-3.1,代码行数:9,代码来源:UBRightPalette.cpp
|
请发表评论