本文整理汇总了C++中setupLayout函数的典型用法代码示例。如果您正苦于以下问题:C++ setupLayout函数的具体用法?C++ setupLayout怎么用?C++ setupLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setupLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: QMainWindow
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent)
{
fileDialog = new QFileDialog(this);
setupLayout();
setupMenuBar();
}
开发者ID:Jakub-Ciecierski,项目名称:BottleneckTSP,代码行数:7,代码来源:mainwindow.cpp
示例2: qstring
int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool includePartialGlyphs) const
{
QString string = qstring(run);
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
return line.xToCursor(position);
}
开发者ID:Fale,项目名称:qtmoko,代码行数:7,代码来源:FontQt.cpp
示例3: SettingsPage
ProfilePage::ProfilePage(QWidget *parent)
: SettingsPage(SCHAT_ICON(Profile), LS("profile"), parent)
{
m_profileLabel = new QLabel(this);
m_nickLabel = new QLabel(this);
m_nickEdit = new NickEdit(this);
m_genderLabel = new QLabel(this);
m_genderField = new GenderField(this);
m_layout = new ProfileLayout(this);
QGridLayout *profileLay = new QGridLayout();
profileLay->addWidget(m_nickLabel, 0, 0);
profileLay->addWidget(m_nickEdit, 0, 1, 1, 2);
profileLay->addWidget(m_genderLabel, 1, 0);
profileLay->addWidget(m_genderField, 1, 1);
profileLay->addWidget(m_layout->button(), 1, 2);
profileLay->setContentsMargins(10, 0, 3, 0);
m_mainLayout = new QVBoxLayout();
m_mainLayout->addWidget(m_profileLabel);
m_mainLayout->addLayout(profileLay);
m_mainLayout->addWidget(m_layout);
setupLayout();
retranslateUi();
}
开发者ID:johnbolia,项目名称:schat,代码行数:28,代码来源:SettingsTabImpl.cpp
示例4: QGroupBox
//-----------------------------------------------------------------------------
// Function: BusDefGroup::BusDefGroup()
//-----------------------------------------------------------------------------
BusDefGroup::BusDefGroup(QWidget *parent):
QGroupBox(tr("General (Bus Definition)"), parent),
busDef_(),
directConnection_(tr("Allow direct master-slave connection"), this),
isAddressable_(tr("Addressable bus"), this),
maxMasters_(this),
maxSlaves_(this),
descriptionEditor_(this)
{
QRegExp regExp(QString("[0-9]*"), Qt::CaseInsensitive, QRegExp::W3CXmlSchema11);
QRegExpValidator* validator = new QRegExpValidator(regExp, this);
maxMasters_.setValidator(validator);
maxSlaves_.setValidator(validator);
maxMasters_.setPlaceholderText(tr("unbound"));
maxSlaves_.setPlaceholderText(tr("unbound"));
setupLayout();
connect(&maxMasters_, SIGNAL(editingFinished()), this, SLOT(onMastersChanged()), Qt::UniqueConnection);
connect(&maxSlaves_, SIGNAL(editingFinished()), this, SLOT(onSlavesChanged()), Qt::UniqueConnection);
connect(&directConnection_, SIGNAL(toggled(bool)),
this, SLOT(onDirectConnectionChanged(bool)), Qt::UniqueConnection);
connect(&isAddressable_, SIGNAL(toggled(bool)),
this, SLOT(onIsAddressableChanged(bool)), Qt::UniqueConnection);
connect(&descriptionEditor_, SIGNAL(textChanged()), this, SLOT(onDescriptionChanged()), Qt::UniqueConnection);
}
开发者ID:kammoh,项目名称:kactus2,代码行数:32,代码来源:busdefgroup.cpp
示例5: wxDialog
SetupWizardDialog::SetupWizardDialog(wxWindow* parent) : wxDialog(parent, -1, "First Time SLADE Setup", wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{
// Create pages
pages.push_back(new TempFolderWizardPage(this));
pages.push_back(new BaseResourceWizardPage(this));
pages.push_back(new NodeBuildersWizardPage(this));
current_page = 0;
// Hide all pages
for (unsigned a = 0; a < pages.size(); a++)
pages[a]->Show(false);
// Init layout
setupLayout();
// Set icon
wxIcon icon;
icon.CopyFromBitmap(getIcon("i_logo"));
SetIcon(icon);
// Setup layout
SetInitialSize(wxSize(600, 500));
Layout();
Fit();
SetMinSize(GetBestSize());
CenterOnParent();
showPage(0);
// Bind events
btn_next->Bind(wxEVT_BUTTON, &SetupWizardDialog::onBtnNext, this);
btn_prev->Bind(wxEVT_BUTTON, &SetupWizardDialog::onBtnPrev, this);
}
开发者ID:DemolisherOfSouls,项目名称:SLADE,代码行数:33,代码来源:SetupWizardDialog.cpp
示例6: config
void EmergingPlasmoid::init() {
gentooLogoLabel.setAlignment(Qt::AlignCenter | Qt::AlignHCenter);
gentooLogoLabel.setOpacity(0.7f);
currentJobMeter.setMeterType(Plasma::Meter::BarMeterHorizontal);
currentJobMeter.setMaximum(100);
currentJobMeter.setMaximumHeight(40.0f);
currentJobMeter.setMinimumHeight(40.0f);
currentJobMeter.setLabelAlignment(0, Qt::AlignJustify | Qt::AlignVCenter);
currentJobMeter.setLabelAlignment(1, Qt::AlignRight | Qt::AlignVCenter);
currentJobMeter.setLabelAlignment(2, Qt::AlignRight | Qt::AlignVCenter);
totalJobMeter.setMeterType(Plasma::Meter::BarMeterHorizontal);
totalJobMeter.setMaximum(100);
totalJobMeter.setMaximumHeight(40.0f);
totalJobMeter.setMinimumHeight(40.0f);
totalJobMeter.setLabelAlignment(0, Qt::AlignJustify | Qt::AlignVCenter);
totalJobMeter.setLabelAlignment(1, Qt::AlignRight | Qt::AlignVCenter);
totalJobMeter.setLabelAlignment(2, Qt::AlignRight | Qt::AlignVCenter);
KConfigGroup conf = config();
timeout = conf.readEntry("timeout", 10);
logoPosition =(LogoPosition) conf.readEntry("logoPosition", (int)LogoInTop);
layout = new QGraphicsGridLayout(this);
setupLayout();
clear();
}
开发者ID:mobius3,项目名称:emerging-plasmoid,代码行数:30,代码来源:emergingplasmoid.cpp
示例7: fixSpacing
int Font::offsetForPositionForComplexText(const TextRun& run, int position, bool) const
{
const QString string = fixSpacing(qstring(run));
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
return line.xToCursor(position);
}
开发者ID:flying-dutchmen,项目名称:3DS_w3Browser,代码行数:7,代码来源:FontQt.cpp
示例8: QWidget
SettingsWidget::SettingsWidget(QWidget *parent):
QWidget( parent )
{
setupComponents();
setupActions();
setupLayout();
}
开发者ID:biosignalpi,项目名称:Version-A1-Rapsberry-PI,代码行数:7,代码来源:settingswidget.cpp
示例9: PrefsPanelBase
// -----------------------------------------------------------------------------
// GraphicsPrefsPanel class constructor
// -----------------------------------------------------------------------------
GraphicsPrefsPanel::GraphicsPrefsPanel(wxWindow* parent) : PrefsPanelBase(parent)
{
// Create controls
auto cp_flags = wxCLRP_SHOW_LABEL | wxCLRP_USE_TEXTCTRL;
cp_colour1_ = new wxColourPickerCtrl(this, -1, *wxBLACK, wxDefaultPosition, wxDefaultSize, cp_flags);
cp_colour2_ = new wxColourPickerCtrl(this, -1, *wxBLACK, wxDefaultPosition, wxDefaultSize, cp_flags);
choice_presets_ = new wxChoice(this, -1);
choice_presets_->Append(WxUtils::arrayString({ "Default",
"Black",
"Black (Checkered)",
"Cyan",
"Cyan (Checkered)",
"Magenta",
"Magenta (Checkered)",
"White",
"White (Checkered)",
"Yellow",
"Yellow (Checkered)",
"Vintage Id Software" }));
choice_browser_bg_ = new wxChoice(this, -1);
choice_browser_bg_->Append(
WxUtils::arrayString({ "Transparent background (as above)", "System background", "Black background" }));
cb_show_border_ = new wxCheckBox(this, -1, "Show outline around graphics and textures");
cb_hilight_mouseover_ = new wxCheckBox(this, -1, "Hilight graphics on mouse hover");
cb_extra_gfxconv_ = new wxCheckBox(this, -1, "Offer additional conversion options");
setupLayout();
// Bind events
choice_presets_->Bind(wxEVT_CHOICE, &GraphicsPrefsPanel::onChoicePresetSelected, this);
}
开发者ID:Altazimuth,项目名称:SLADE,代码行数:34,代码来源:GraphicsPrefsPanel.cpp
示例10: QGroupBox
//-----------------------------------------------------------------------------
// Function: AbsDefGroup::AbsDefGroup()
//-----------------------------------------------------------------------------
AbsDefGroup::AbsDefGroup(LibraryInterface* handler, QWidget *parent):
QGroupBox(tr("Signals (Abstraction Definition)"), parent),
portView_(this),
portModel_(this),
handler_(handler),
absDef_()
{
portView_.setModel(&portModel_);
portView_.setItemDelegate(new BusPortsDelegate(this));
portView_.setAllowImportExport(true);
portView_.setItemsDraggable(false);
connect(&portView_, SIGNAL(addSignalOptions()), this, SLOT(onAddSignalOptions()), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)),
this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(contentChanged()),
this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(noticeMessage(const QString&)),
this, SIGNAL(noticeMessage(const QString&)), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(errorMessage(const QString&)),
this, SIGNAL(errorMessage(const QString&)), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(portRenamed(const QString&, const QString&)),
this, SIGNAL(portRenamed(const QString&, const QString&)), Qt::UniqueConnection);
connect(&portModel_, SIGNAL(portRemoved(const QString&, const General::InterfaceMode)),
this, SIGNAL(portRemoved(const QString&, const General::InterfaceMode)), Qt::UniqueConnection);
connect(&portView_, SIGNAL(addItem(const QModelIndex&)),
&portModel_, SLOT(addSignal()), Qt::UniqueConnection);
connect(&portView_, SIGNAL(removeItem(const QModelIndex&)),
&portModel_, SLOT(onRemoveItem(const QModelIndex&)), Qt::UniqueConnection);
setupLayout();
}
开发者ID:kammoh,项目名称:kactus2,代码行数:37,代码来源:absdefgroup.cpp
示例11: QWidget
/**
* Constructor.
* @param cam
* @param parent
*/
CameraCalibrationEvaluation::CameraCalibrationEvaluation(scc::CameraCalibration *cam,
QWidget *parent) :
QWidget(parent) {
qDebug() << "CameraCalibrationEvaluation(QTabWidget *parent):";
cameraCalibration = cam;
setupLayout();
}
开发者ID:getokoe,项目名称:Stereocalibrator,代码行数:12,代码来源:cameracalibrationevaluation.cpp
示例12: STopWindow
/* MainWindow::MainWindow
* MainWindow class constructor
*******************************************************************/
MainWindow::MainWindow()
: STopWindow("SLADE", mw_left, mw_top, mw_width, mw_height) {
lasttipindex = 0;
custom_menus_begin = 2;
if (mw_maximized) Maximize();
setupLayout();
SetDropTarget(new MainWindowDropTarget());
}
开发者ID:doomtech,项目名称:slade,代码行数:11,代码来源:MainWindow.cpp
示例13: ItemEditor
//-----------------------------------------------------------------------------
// Function: AddressSpaceEditor::AddressSpaceEditor()
//-----------------------------------------------------------------------------
AddressSpaceEditor::AddressSpaceEditor(QSharedPointer<Component> component,
LibraryInterface* handler,
QSharedPointer<AddressSpace> addrSpace,
QSharedPointer <ParameterFinder> parameterFinder,
QSharedPointer <ExpressionFormatter> expressionFormatter,
QSharedPointer<ExpressionParser> expressionParser,
QWidget* parent):
ItemEditor(component, handler, parent),
addrSpace_(addrSpace),
nameEditor_(addrSpace->getNameGroup(), this),
generalEditor_(addrSpace, component->getMasterInterfaces(addrSpace_->getName()), parameterFinder,
expressionParser, this),
segmentsEditor_(addrSpace, component, handler->getDirectoryPath(*component->getVlnv()), parameterFinder,
expressionParser, expressionFormatter, this),
localMemMapEditor_(addrSpace->getLocalMemoryMap(), component, handler, parameterFinder, expressionFormatter,
this)
{
Q_ASSERT(addrSpace_);
nameEditor_.setTitle(tr("Address space name and description"));
connect(&nameEditor_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&generalEditor_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&generalEditor_, SIGNAL(graphicsChanged()), this, SIGNAL(graphicsChanged()), Qt::UniqueConnection);
connect(&generalEditor_, SIGNAL(increaseReferences(QString)),
this, SIGNAL(increaseReferences(QString)), Qt::UniqueConnection);
connect(&generalEditor_, SIGNAL(decreaseReferences(QString)),
this, SIGNAL(decreaseReferences(QString)), Qt::UniqueConnection);
connect(&segmentsEditor_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&segmentsEditor_, SIGNAL(contentChanged()), this, SIGNAL(graphicsChanged()), Qt::UniqueConnection);
connect(&segmentsEditor_, SIGNAL(errorMessage(const QString&)),
this, SIGNAL(errorMessage(const QString&)), Qt::UniqueConnection);
connect(&segmentsEditor_, SIGNAL(noticeMessage(const QString&)),
this, SIGNAL(noticeMessage(const QString&)), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(contentChanged()), this, SIGNAL(contentChanged()), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(graphicsChanged()), this, SIGNAL(graphicsChanged()), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(errorMessage(const QString&)),
this, SIGNAL(errorMessage(const QString&)), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(itemAdded(int)),
this, SIGNAL(childAdded(int)), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(itemRemoved(int)),
this, SIGNAL(childRemoved(int)), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(increaseReferences(QString)),
this, SIGNAL(increaseReferences(QString)), Qt::UniqueConnection);
connect(&localMemMapEditor_, SIGNAL(decreaseReferences(QString)),
this, SIGNAL(decreaseReferences(QString)), Qt::UniqueConnection);
setupLayout();
refresh();
}
开发者ID:kammoh,项目名称:kactus2,代码行数:60,代码来源:addressspaceeditor.cpp
示例14: SettingsPage
//-----------------------------------------------------------------------------
// Function: ComponentEditorSettingsPage::ComponentEditorSettingsPage()
//-----------------------------------------------------------------------------
ComponentEditorSettingsPage::ComponentEditorSettingsPage(QSettings &settings) :
SettingsPage(settings),
workspaceHwCheckBoxes_(),
workspaceSwCheckBoxes_(),
currentWorkspaceIndex_(0)
{
loadSettings();
setupLayout();
}
开发者ID:kammoh,项目名称:kactus2,代码行数:12,代码来源:ComponentEditorSettingsPage.cpp
示例15: PreferencesWidget
DebugPreferences::DebugPreferences(QWidget * parent) :
PreferencesWidget(parent),
layout_(NULL)
{
setTitle(tr("Debug"));
setIcon(iconFromTheme("tools-report-bug"));
setupLayout();
setupUI();
}
开发者ID:nctan,项目名称:quneiform,代码行数:9,代码来源:debugpreferences.cpp
示例16: fromRawDataWithoutRef
int Font::offsetForPositionForComplexText(const TextRun& run, float position, bool) const
{
String sanitized = Font::normalizeSpaces(run.characters(), run.length());
QString string = fromRawDataWithoutRef(sanitized);
QTextLayout layout(string, font());
QTextLine line = setupLayout(&layout, run);
return line.xToCursor(position);
}
开发者ID:akosicki,项目名称:phantomjs,代码行数:9,代码来源:FontQt.cpp
示例17: SDialog
// -----------------------------------------------------------------------------
// GfxConvDialog class constructor
// -----------------------------------------------------------------------------
GfxConvDialog::GfxConvDialog(wxWindow* parent) : SDialog(parent, "Graphic Format Conversion", "gfxconv")
{
// Set dialog icon
wxIcon icon;
icon.CopyFromBitmap(Icons::getIcon(Icons::General, "convert"));
SetIcon(icon);
setupLayout();
CenterOnParent();
}
开发者ID:alexey-lysiuk,项目名称:SLADE,代码行数:13,代码来源:GfxConvDialog.cpp
示例18: QWidget
PlottingWidget::PlottingWidget(QWidget *parent):
QWidget( parent )
{
recordingTime = 0;
nFrames = 0;
currentFrame = 0;
setupComponents();
setupActions();
setupLayout();
}
开发者ID:biosignalpi,项目名称:Version-A1-Rapsberry-PI,代码行数:11,代码来源:plottingwidget.cpp
示例19: NewObjectDialog
//-----------------------------------------------------------------------------
// Function: NewBusDialog::NewBusDialog()
//-----------------------------------------------------------------------------
NewBusDialog::NewBusDialog(LibraryInterface* handler, QWidget* parent) :
NewObjectDialog(handler, VLNV::BUSDEFINITION , false, parent),
nameSelection_(tr("Name"), this),
descriptionSelection_(tr("Description"), this)
{
setWindowTitle(tr("New bus interface"));
setupLayout();
setFixedHeight(sizeHint().height());
resize(400, sizeHint().height());
}
开发者ID:kammoh,项目名称:kactus2,代码行数:14,代码来源:NewBusDialog.cpp
示例20: STopWindow
// -----------------------------------------------------------------------------
// MainWindow class constructor
// -----------------------------------------------------------------------------
MainWindow::MainWindow() : STopWindow("SLADE", "main")
{
custom_menus_begin_ = 2;
if (mw_maximized)
wxTopLevelWindow::Maximize();
setupLayout();
wxWindow::SetDropTarget(new MainWindowDropTarget());
}
开发者ID:sirjuddington,项目名称:SLADE,代码行数:14,代码来源:MainWindow.cpp
注:本文中的setupLayout函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论