本文整理汇总了C++中QSplitter::setSizePolicy方法的典型用法代码示例。如果您正苦于以下问题:C++ QSplitter::setSizePolicy方法的具体用法?C++ QSplitter::setSizePolicy怎么用?C++ QSplitter::setSizePolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QSplitter
的用法示例。
在下文中一共展示了QSplitter::setSizePolicy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deletecloseClicked
void MainWindow::deletecloseClicked()
{
m_deleteActionDialogue->close();
QSplitter *central = new QSplitter(Qt::Vertical, this);
central->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
model = new PlotsModel(central);
QLabel *label = new QLabel("Equation");
textfield = new QLineEdit();
QPushButton *plotb = new QPushButton();
plotb->setText("Plot");
PlotsView3D *view3d = new PlotsView3D();
sfactory = PlotsFactory::self();
view3d->setUseSimpleRotation(args->isSet("simple-rotation"));
view3d->setModel(model);
QWidget *widget=new QWidget(this);
QGridLayout *layout = new QGridLayout;
layout->addWidget(label,0,0);
layout->addWidget(textfield,0,1);
layout->addWidget(plotb,0,2);
layout->addWidget(view3d,1,0,1,3);
widget->setLayout(layout);
setCentralWidget(widget);
widget->connect(plotb,SIGNAL(clicked()),this,SLOT(buttonclicked()));
createDockWindows();
random=0;
setColorList();
this->show();
}
示例2: setupLayout
//-----------------------------------------------------------------------------
// Function: AddressSpaceEditor::setupLayout()
//-----------------------------------------------------------------------------
void AddressSpaceEditor::setupLayout()
{
QScrollArea* scrollArea = new QScrollArea(this);
scrollArea->setWidgetResizable(true);
scrollArea->setFrameShape(QFrame::NoFrame);
QVBoxLayout* scrollLayout = new QVBoxLayout(this);
scrollLayout->addWidget(scrollArea);
scrollLayout->setContentsMargins(0, 0, 0, 0);
QWidget* topWidget = new QWidget(scrollArea);
topWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QVBoxLayout* topLayout = new QVBoxLayout(topWidget);
QHBoxLayout* nameAndGeneralLayout = new QHBoxLayout();
nameAndGeneralLayout->addWidget(&nameEditor_, 0, Qt::AlignTop);
nameAndGeneralLayout->addWidget(&generalEditor_);
topLayout->addLayout(nameAndGeneralLayout);
topLayout->addWidget(&segmentsEditor_, 1);
topLayout->setContentsMargins(0, 0, 0, 0);
QWidget* bottomWidget = new QWidget(scrollArea);
bottomWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
QVBoxLayout* bottomLayout = new QVBoxLayout(bottomWidget);
bottomLayout->addWidget(&localMemMapEditor_);
bottomLayout->setContentsMargins(0, 0, 0, 0);
QSplitter* verticalSplitter = new QSplitter(Qt::Vertical, scrollArea);
verticalSplitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
verticalSplitter->addWidget(topWidget);
verticalSplitter->addWidget(bottomWidget);
verticalSplitter->setStretchFactor(1, 1);
QSplitterHandle* handle = verticalSplitter->handle(1);
QVBoxLayout* handleLayout = new QVBoxLayout(handle);
handleLayout->setSpacing(0);
handleLayout->setMargin(0);
QFrame* line = new QFrame(handle);
line->setLineWidth(2);
line->setMidLineWidth(2);
line->setFrameShape(QFrame::HLine);
line->setFrameShadow(QFrame::Sunken);
handleLayout->addWidget(line);
verticalSplitter->setHandleWidth(10);
scrollArea->setWidget(verticalSplitter);
}
示例3: QMenu
MainWindow::MainWindow(KCmdLineArgs* args)
{
this->setMinimumSize(640, 480);
m_menu = new QMenu(this);
QSplitter *central = new QSplitter(Qt::Vertical, this);
central->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_model = new PlotsModel(central);
m_size2=0;
m_treeview = new QTreeView(this);
QLabel *label = new QLabel("Equation",this);
m_textfield = new QLineEdit(this);
QPushButton *plotb = new QPushButton(this);
plotb->setText("Plot");
m_view3d = new PlotsView3D(this);
m_sfactory = PlotsFactory::self();
m_view3d->setUseSimpleRotation(args->isSet("simple-rotation"));
QWidget *widget=new QWidget(this);
m_listwidget = new QListWidget(this);
m_listwidget->setVisible(false);
m_listwidget2 = new QListWidget(this);
m_listwidget2->setVisible(false);
QGridLayout *layout = new QGridLayout;
layout->addWidget(label,0,0);
layout->addWidget(m_textfield,0,1);
layout->addWidget(plotb,0,2);
layout->addWidget(m_view3d,1,0,1,2);
layout->addWidget(m_treeview,1,2);
widget->setLayout(layout);
setCentralWidget(widget);
widget->connect(plotb,SIGNAL(clicked()),this,SLOT(buttonclicked()));
m_random=0;
m_size=0;
setColorList();
createActions();
m_treeview->setModel(m_model);
m_view3d->setModel(m_model);
m_treeview->setEditTriggers(QAbstractItemView::AnyKeyPressed | QAbstractItemView::DoubleClicked);
this->show();
}
示例4: Dialog
AntialiasPopup::AntialiasPopup()
: Dialog(TApp::instance()->getMainWindow(), true, false, "Antialias"), m_startRas(0)
{
setWindowTitle(tr("Apply Antialias"));
setLabelWidth(0);
setModal(false);
setTopMargin(0);
setTopSpacing(0);
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
endVLayout();
//------------------------- Top Layout --------------------------
QScrollArea *scrollArea = new QScrollArea(splitter);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setWidgetResizable(true);
splitter->addWidget(scrollArea);
splitter->setStretchFactor(0, 1);
QFrame *topWidget = new QFrame(scrollArea);
topWidget->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
scrollArea->setWidget(topWidget);
QGridLayout *topLayout = new QGridLayout(this);
topWidget->setLayout(topLayout);
//------------------------- Parameters --------------------------
//Brightness
QLabel *brightnessLabel = new QLabel(tr("Threshold:"));
topLayout->addWidget(brightnessLabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter);
m_thresholdField = new DVGui::IntField(topWidget);
m_thresholdField->setRange(0, 255);
m_thresholdField->setValue(40);
topLayout->addWidget(m_thresholdField, 0, 1);
//Contrast
QLabel *contrastLabel = new QLabel(tr("Softness:"));
topLayout->addWidget(contrastLabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter);
m_softnessField = new DVGui::IntField(topWidget);
m_softnessField->setRange(0, 100);
m_softnessField->setValue(70);
topLayout->addWidget(m_softnessField, 1, 1);
topLayout->setRowStretch(2, 1);
//--------------------------- Swatch ----------------------------
m_viewer = new Swatch(splitter);
m_viewer->setMinimumHeight(150);
m_viewer->setFocusPolicy(Qt::WheelFocus);
splitter->addWidget(m_viewer);
//--------------------------- Button ----------------------------
m_okBtn = new QPushButton(QString(tr("Apply")), this);
connect(m_okBtn, SIGNAL(clicked()), this, SLOT(apply()));
addButtonBarWidget(m_okBtn);
//------------------------ Connections --------------------------
TApp *app = TApp::instance();
bool ret = true;
ret = ret && connect(m_thresholdField, SIGNAL(valueChanged(bool)), this, SLOT(onValuesChanged(bool)));
ret = ret && connect(m_softnessField, SIGNAL(valueChanged(bool)), this, SLOT(onValuesChanged(bool)));
assert(ret);
m_viewer->resize(0, 350);
resize(600, 500);
}
示例5: addParameterGroup
VectorizerPopup::VectorizerPopup(QWidget *parent, Qt::WFlags flags)
#endif
: Dialog(TApp::instance()->getMainWindow(), true, false, "Vectorizer"), m_sceneHandle(TApp::instance()->getCurrentScene())
{
struct Locals {
int m_bit;
Locals() : m_bit() {}
static void addParameterGroup(
std::vector<ParamGroup> ¶mGroups,
int group, int startRow, int separatorRow = -1)
{
assert(group <= paramGroups.size());
if (group == paramGroups.size())
paramGroups.push_back(ParamGroup(startRow, separatorRow));
}
void addParameter(
std::vector<ParamGroup> ¶mGroups,
const QString ¶mName)
{
paramGroups.back().m_params.push_back(Param(paramName, m_bit++));
}
} locals;
// Su MAC i dialog modali non hanno bottoni di chiusura nella titleBar
setModal(false);
setWindowTitle(tr("Convert-to-Vector Settings"));
setLabelWidth(125);
setTopMargin(0);
setTopSpacing(0);
// Build vertical layout
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical, this);
splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
QToolBar *leftToolBar = new QToolBar,
*rightToolBar = new QToolBar;
{
QWidget *toolbarsContainer = new QWidget(this);
toolbarsContainer->setFixedHeight(22);
addWidget(toolbarsContainer);
QHBoxLayout *toolbarsLayout = new QHBoxLayout(toolbarsContainer);
toolbarsContainer->setLayout(toolbarsLayout);
toolbarsLayout->setMargin(0);
toolbarsLayout->setSpacing(0);
QToolBar *spacingToolBar = new QToolBar(toolbarsContainer); // The spacer object must be a toolbar.
spacingToolBar->setFixedHeight(22); // It's related to qss choices... I know it's stinky
toolbarsLayout->addWidget(leftToolBar, 0, Qt::AlignLeft);
toolbarsLayout->addWidget(spacingToolBar, 1);
toolbarsLayout->addWidget(rightToolBar, 0, Qt::AlignRight);
}
endVLayout();
// Build parameters area
QScrollArea *paramsArea = new QScrollArea(splitter);
paramsArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
paramsArea->setWidgetResizable(true);
splitter->addWidget(paramsArea);
splitter->setStretchFactor(0, 1);
m_paramsWidget = new QFrame(paramsArea);
paramsArea->setWidget(m_paramsWidget);
m_paramsLayout = new QGridLayout;
m_paramsWidget->setLayout(m_paramsLayout);
int group = 0, row = 0;
locals.addParameterGroup(::l_centerlineParamGroups, group, row);
locals.addParameterGroup(::l_outlineParamGroups, group++, row);
// Vectorization mode
m_typeMenu = new QComboBox(this);
m_typeMenu->setFixedSize(245, WidgetHeight);
QStringList formats;
formats << tr("Centerline") << tr("Outline");
m_typeMenu->addItems(formats);
m_typeMenu->setMinimumHeight(WidgetHeight);
bool isOutline = m_sceneHandle->getScene()->getProperties()->getVectorizerParameters()->m_isOutline;
m_typeMenu->setCurrentIndex(isOutline ? 1 : 0);
connect(m_typeMenu, SIGNAL(currentIndexChanged(int)), this, SLOT(onTypeChange(int)));
m_paramsLayout->addWidget(new QLabel(tr("Mode")), row, 0, Qt::AlignRight);
m_paramsLayout->addWidget(m_typeMenu, row++, 1);
locals.addParameter(l_centerlineParamGroups, tr("Mode"));
//.........这里部分代码省略.........
示例6: QWidget
CleanupSettings::CleanupSettings(QWidget *parent)
: QWidget(parent), m_attached(false)
{
QVBoxLayout *vLayout = new QVBoxLayout(this);
vLayout->setMargin(1); // NOTE: This works to show the 1-pix black border,
// because this is a QWidget (not QFrame) heir...
setLayout(vLayout);
// Tabs Container
// Used to deal with styled background and other stuff
TabBarContainter *tabBarContainer = new TabBarContainter(this);
QHBoxLayout *hLayout = new QHBoxLayout(tabBarContainer);
hLayout->setMargin(0);
hLayout->setAlignment(Qt::AlignLeft);
hLayout->addSpacing(6);
vLayout->addWidget(tabBarContainer);
// Tabs Bar
DVGui::TabBar *tabBar = new DVGui::TabBar(this);
hLayout->addWidget(tabBar);
tabBar->addSimpleTab(tr("Cleanup"));
tabBar->addSimpleTab(tr("Processing"));
tabBar->addSimpleTab(tr("Camera"));
tabBar->setDrawBase(false);
// Splitter
QSplitter *split = new QSplitter(Qt::Vertical, this);
split->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
vLayout->addWidget(split);
// Stacked Widget
QStackedWidget *stackedWidget = new QStackedWidget(split);
stackedWidget->setMinimumWidth(300);
//stackedWidget->setMinimumHeight(250);
split->addWidget(stackedWidget);
split->setStretchFactor(0, 1);
// Cleanup Tab
QScrollArea *scrollArea = new QScrollArea(stackedWidget);
stackedWidget->addWidget(scrollArea);
scrollArea->setWidgetResizable(true);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_cleanupTab = new CleanupTab;
scrollArea->setWidget(m_cleanupTab);
// Processing Tab
scrollArea = new QScrollArea(stackedWidget);
stackedWidget->addWidget(scrollArea);
scrollArea->setWidgetResizable(true);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_processingTab = new ProcessingTab;
scrollArea->setWidget(m_processingTab);
// Camera Tab
scrollArea = new QScrollArea(stackedWidget);
stackedWidget->addWidget(scrollArea);
scrollArea->setWidgetResizable(true);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
m_cameraTab = new CameraTab;
scrollArea->setWidget(m_cameraTab);
m_cameraTab->setCameraPresetListFile(ToonzFolder::getReslistPath(true));
// Swatch
m_swatch = new CleanupSwatch(split, 200, 150);
split->addWidget(m_swatch);
// ToolBar
QWidget *toolBarWidget = new QWidget(this);
vLayout->addWidget(toolBarWidget);
toolBarWidget->setFixedHeight(22);
QHBoxLayout *toolBarLayout = new QHBoxLayout(toolBarWidget);
toolBarWidget->setLayout(toolBarLayout);
toolBarLayout->setMargin(0);
toolBarLayout->setSpacing(0);
QToolBar *leftToolBar = new QToolBar(toolBarWidget);
toolBarLayout->addWidget(leftToolBar, 0, Qt::AlignLeft);
//.........这里部分代码省略.........
示例7: query
CCustomer::CCustomer(QWidget *parent) :
QWidget(parent)
, actualRecords(false)
, ui(new Ui::CCustomer)
, customerDialog(new CCustomerDialog(this)), customer_gDialog(new CCustomer_gDialog(this))
, discountDialog(new CDiscountDialog(this))
, addItem(new CAddItem(this))
, focusedWidget(nullptr)
{
ui->setupUi(this);
// model
modelFaces = new QStandardItemModel(this);
modelPartner = new QStandardItemModel(this);
modelHuman = new QStandardItemModel(this);
modelSelectionFaces = new QItemSelectionModel(modelFaces);
modelSelectionPartner = new QItemSelectionModel(modelPartner);
modelSelectionHuman = new QItemSelectionModel(modelHuman);
// create #temporary table
QString query ("SELECT * INTO #GroupCustomerDiscounts FROM ViewGroupCustomerDiscounts"
"SELECT * INTO #CustomerSubdiller FROM ViewCustomerSubdiller");
QSqlQuery temporary(currentDatabase());
temporary.exec(query);
QSplitter *hSplitter = new QSplitter(Qt::Horizontal);
QSplitter *vSplitter = new QSplitter(Qt::Vertical);
QWidget *w1 = new QWidget(this);
QWidget *w2 = new QWidget(this);
treeFaces = new QTreeView (this);
treePartner = new CCustomerTreeView (this);
textEditPartnerComment = new QTextEdit (this);
textEditPartnerComment->setMaximumWidth(100);
textEditPartnerComment->setReadOnly(true);
treeHuman = new CCustomerTreeView (this);
textEditHumanComment = new QTextEdit (this);
textEditHumanComment->setMaximumWidth(100);
textEditHumanComment->setReadOnly(true);
QHBoxLayout *hboxPartner = new QHBoxLayout(w1);
hboxPartner->setMargin(0);
hboxPartner->addWidget(treePartner);
hboxPartner->addWidget(textEditPartnerComment);
QHBoxLayout *hboxHuman = new QHBoxLayout(w2);
hboxHuman->setMargin(0);
hboxHuman->addWidget(treeHuman);
hboxHuman->addWidget(textEditHumanComment);
vSplitter->addWidget(w1);
vSplitter->addWidget(w2);
vSplitter->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
ui->vLayoutUnionPartnerHuman->addWidget(vSplitter);
hSplitter->addWidget(treeFaces);
hSplitter->addWidget(vSplitter);
hSplitter->setStretchFactor(1, 3);
hSplitter->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
ui->hLayoutUnionViews->addWidget(hSplitter);
treeFaces->setObjectName("treeViewFaces");
treeFaces->setModel(modelFaces);
treeFaces->setSelectionModel(modelSelectionFaces);
treeFaces->setEditTriggers(QAbstractItemView::NoEditTriggers);
treeFaces->installEventFilter(this);
treePartner->setObjectName("treeViewPartner");
treePartner->setRootIsDecorated(false);
treePartner->setAlternatingRowColors(true);
treePartner->setModel(modelPartner);
treePartner->setSelectionModel(modelSelectionPartner);
treePartner->setEditTriggers(QAbstractItemView::NoEditTriggers);
treePartner->installEventFilter(this);
treeHuman->setObjectName("treeViewHuman");
treeHuman->setRootIsDecorated(false);
treeHuman->setAlternatingRowColors(true);
treeHuman->setModel(modelHuman);
treeHuman->setSelectionModel(modelSelectionHuman);
treeHuman->setEditTriggers(QAbstractItemView::NoEditTriggers);
treeHuman->installEventFilter(this);
filter = new CFilter(this);
filter->setObjectName("filter");
filter->setPlaceholderText("Введите наименование");
filter->installEventFilter(this);
filter->setValidator(new QRegExpValidator(QRegExp(trUtf8("[а-яА-Яa-zA-Z0-9_]+")), this));
ui->hLayoutSearchToItem->addWidget(filter);
QToolButton *telephone = new QToolButton(this);
QPixmap pixmapTelephone("data/picture/additionally/telephone.png");
telephone->setIcon(QIcon(pixmapTelephone));
telephone->setIconSize(QSize(24, 24));
telephone->setCursor(Qt::PointingHandCursor);
//.........这里部分代码省略.........
示例8: QSplitter
MeshifyPopup::MeshifyPopup()
: DVGui::Dialog(TApp::instance()->getMainWindow(), true, false, "MeshifyPopup"), m_r(-1), m_c(-1)
{
setWindowTitle(tr("Create Mesh"));
setLabelWidth(0);
setModal(false);
setTopMargin(0);
setTopSpacing(0);
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
endVLayout();
//------------------------- Top Layout --------------------------
QScrollArea *scrollArea = new QScrollArea(splitter);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setWidgetResizable(true);
scrollArea->setMinimumWidth(450);
splitter->addWidget(scrollArea);
splitter->setStretchFactor(0, 1);
QFrame *topWidget = new QFrame(scrollArea);
scrollArea->setWidget(topWidget);
QGridLayout *topLayout = new QGridLayout(topWidget); // Needed to justify at top
topWidget->setLayout(topLayout);
//------------------------- Parameters --------------------------
int row = 0;
QLabel *edgesLengthLabel = new QLabel(tr("Mesh Edges Length:"));
topLayout->addWidget(edgesLengthLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);
m_edgesLength = new DVGui::MeasuredDoubleField;
m_edgesLength->setMeasure("length.x");
m_edgesLength->setRange(0.0, 1.0); // In inches (standard unit)
m_edgesLength->setValue(0.2);
topLayout->addWidget(m_edgesLength, row++, 1);
QLabel *rasterizationDpiLabel = new QLabel(tr("Rasterization DPI:"));
topLayout->addWidget(rasterizationDpiLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);
m_rasterizationDpi = new DVGui::DoubleLineEdit;
m_rasterizationDpi->setRange(1.0, (std::numeric_limits<double>::max)());
m_rasterizationDpi->setValue(300.0);
topLayout->addWidget(m_rasterizationDpi, row++, 1);
QLabel *shapeMarginLabel = new QLabel(tr("Mesh Margin (pixels):"));
topLayout->addWidget(shapeMarginLabel, row, 0, Qt::AlignRight | Qt::AlignVCenter);
m_margin = new DVGui::IntLineEdit;
m_margin->setRange(2, (std::numeric_limits<int>::max)());
m_margin->setValue(5);
topLayout->addWidget(m_margin, row++, 1);
connect(m_edgesLength, SIGNAL(valueChanged(bool)), this, SLOT(onParamsChanged(bool)));
connect(m_rasterizationDpi, SIGNAL(editingFinished()), this, SLOT(onParamsChanged()));
connect(m_margin, SIGNAL(editingFinished()), this, SLOT(onParamsChanged()));
topLayout->setRowStretch(row, 1);
//------------------------- View Widget -------------------------
// NOTE: It's IMPORTANT that parent widget is supplied. It's somewhat
// used by QSplitter to decide the initial widget sizes...
m_viewer = new Swatch(splitter);
m_viewer->setMinimumHeight(150);
m_viewer->setFocusPolicy(Qt::WheelFocus);
splitter->addWidget(m_viewer);
//--------------------------- Buttons ---------------------------
m_okBtn = new QPushButton(tr("Apply"));
addButtonBarWidget(m_okBtn);
connect(m_okBtn, SIGNAL(clicked()), this, SLOT(apply()));
// Finally, acquire current selection
onCellSwitched();
m_viewer->resize(0, 350);
resize(600, 700);
}
示例9: initializeMainWindow
void mafMainWindow::initializeMainWindow() {
ui->setupUi(this);
mafGUIRegistration::registerGUIObjects();
m_GUIManager = new mafGUIManager(this, mafCodeLocation);
m_GUIManager->createMenus();
m_GUIManager->createToolBars();
connectCallbacks();
ui->statusBar->showMessage(mafTr("Ready!"));
// Connecting layouts (needed because from QtDesign is not managed automatically)
ui->centralWidget->setLayout(ui->gridLayout);
// SideBar Layout
ui->sideBarDockContents->setLayout(ui->layoutSideBar);
// View's tab
ui->tabView->setLayout(ui->layoutView);
// Operation's tab
ui->tabOperation->setLayout(ui->layoutOperation);
// Hierarchy tree's tab
ui->tabTree->setLayout(ui->layoutTree);
ui->hierarchyWidget->setLayout(ui->layoutHierarchy);
ui->propertiesBoxContainer->setLayout(ui->layoutPropertiesBox);
//tree widget in sidebar
m_Model = new mafTreeModel();
if(m_Logic) {
m_Model->setHierarchy(m_Logic->hierarchy());
}
// **** SideBar ****
m_Tree = m_GUIManager->createTreeWidget(m_Model, ui->hierarchyWidget);
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
splitter->addWidget(ui->hierarchyWidget);
splitter->addWidget(ui->propertiesBoxContainer);
ui->layoutTree->addWidget(splitter);
splitter->setStretchFactor(1, 1);
// SideBar visibility management
QObject *sideBarAction = m_GUIManager->actionByName("SideBar");
connect(ui->dockSideBar, SIGNAL(visibilityChanged(bool)), sideBarAction, SLOT(setChecked(bool)));
connect(sideBarAction, SIGNAL(triggered(bool)), ui->dockSideBar, SLOT(setVisible(bool)));
// **** LogBar ****
// LogBar Layout
ui->logBarWidgetContents->setLayout(ui->gridLayoutLogBar);
QObject *logBarAction = m_GUIManager->actionByName("LogBar");
m_LogWidget = m_GUIManager->createLogWidget(ui->logBarWidgetContents);
connect(ui->dockLogBarWidget, SIGNAL(visibilityChanged(bool)), logBarAction, SLOT(setChecked(bool)));
connect(logBarAction, SIGNAL(triggered(bool)), ui->dockLogBarWidget, SLOT(setVisible(bool)));
// **** Google chat ****
QObject *collaborateAction = m_GUIManager->actionByName("Collaborate");
m_DockGoogleChat = new QDockWidget(tr("Google Chat"));
m_DockGoogleChat->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
m_DockGoogleChat->setWidget(new GoogleChat());
if(collaborateAction) {
connect(collaborateAction, SIGNAL(triggered(bool)), this, SLOT(updateCollaborationDockVisibility(bool)));
connect(m_DockGoogleChat, SIGNAL(visibilityChanged(bool)), collaborateAction, SLOT(setChecked(bool)));
}
connect(ui->mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow*)), this, SLOT(subWindowSelected(QMdiSubWindow*)));
setUnifiedTitleAndToolBarOnMac(true);
// Restore settings notification should be sent at the end of the initialization code, so to be sure that
// each GUI element has been created.
mafEventBus::mafEventBusManager::instance()->notifyEvent("maf.local.logic.settings.restore");
}
示例10: Dialog
BinarizePopup::BinarizePopup()
: Dialog(TApp::instance()->getMainWindow(), true, false, "Binarize"), m_frameIndex(-1), m_progressBar(0), m_timerId(0)
{
setWindowTitle(tr("Binarize"));
setLabelWidth(0);
setModal(false);
setTopMargin(0);
setTopSpacing(0);
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(
QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
endVLayout();
QWidget *parametersArea = new QFrame();
splitter->addWidget(parametersArea);
QGridLayout *parametersLayout = new QGridLayout();
// parametersArea->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
//QFrame* topWidget = new QFrame(scrollArea);
//topWidget->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Fixed));
//scrollArea->setWidget(topWidget);
// parametersLayout->setSizeConstraint(QLayout::SetFixedSize);
//------------------------- Parameters --------------------------
/*
//Brightness
QLabel* brightnessLabel = new QLabel(tr("Brightness:"));
topLayout->addWidget(brightnessLabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter);
m_brightnessField = new DVGui::IntField(topWidget);
m_brightnessField->setRange(-127, 127);
m_brightnessField->setValue(0);
topLayout->addWidget(m_brightnessField, 0, 1);
//Contrast
QLabel* contrastLabel = new QLabel(tr("Contrast:"));
topLayout->addWidget(contrastLabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter);
m_contrastField = new DVGui::IntField(topWidget);
m_contrastField->setRange(-127, 127);
m_contrastField->setValue(0);
topLayout->addWidget(m_contrastField, 1, 1);
*/
m_alphaChk = new DVGui::CheckBox(tr("Alpha"));
m_previewChk = new DVGui::CheckBox(tr("Preview"));
parametersLayout->addWidget(m_alphaChk, 0, 0);
parametersLayout->addWidget(m_previewChk, 0, 1);
parametersArea->setLayout(parametersLayout);
//--------------------------- Swatch ----------------------------
m_viewer = new Swatch();
m_viewer->setMinimumHeight(150);
m_viewer->setFocusPolicy(Qt::WheelFocus);
splitter->addWidget(m_viewer);
splitter->setStretchFactor(0, 0);
splitter->setStretchFactor(1, 1);
//--------------------------- Button ----------------------------
m_okBtn = new QPushButton(tr("Apply"), this);
connect(m_okBtn, SIGNAL(clicked()), this, SLOT(apply()));
addButtonBarWidget(m_okBtn);
//------------------------ Connections --------------------------
bool ret = true;
//ret = ret && connect(m_brightnessField, SIGNAL(valueChanged(bool)), this, SLOT(onValuesChanged(bool)));
//ret = ret && connect(m_contrastField, SIGNAL(valueChanged(bool)), this, SLOT(onValuesChanged(bool)));
ret = ret && connect(m_previewChk, SIGNAL(stateChanged(int)), this, SLOT(onPreviewCheckboxChanged(int)));
ret = ret && connect(m_alphaChk, SIGNAL(stateChanged(int)), this, SLOT(onAlphaCheckboxChanged(int)));
assert(ret);
m_viewer->resize(0, 350);
resize(600, 500);
}
示例11: QSplitter
AdjustLevelsPopup::AdjustLevelsPopup()
: DVGui::Dialog(TApp::instance()->getMainWindow(), true, false, "AdjustLevels"), m_thresholdD(0.005) //0.5% of the image size
{
int i, j;
setWindowTitle(tr("Adjust Levels"));
setLabelWidth(0);
setModal(false);
setTopMargin(0);
setTopSpacing(0);
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
endVLayout();
//------------------------- Top Layout --------------------------
QScrollArea *scrollArea = new QScrollArea(splitter);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setWidgetResizable(true);
scrollArea->setMinimumWidth(450);
splitter->addWidget(scrollArea);
splitter->setStretchFactor(0, 1);
QFrame *topWidget = new QFrame(scrollArea);
scrollArea->setWidget(topWidget);
QVBoxLayout *topVLayout = new QVBoxLayout(topWidget); //Needed to justify at top
topWidget->setLayout(topVLayout);
QHBoxLayout *topLayout = new QHBoxLayout(topWidget);
topVLayout->addLayout(topLayout);
topVLayout->addStretch(1);
//------------------------- Histogram ---------------------------
m_histogram = new Histogram(topWidget);
topLayout->addWidget(m_histogram);
//------------------------- Mark Bars ---------------------------
MarksBar *histogramMarksBar, *colorBarMarksBar;
QVBoxLayout *histogramViewLayout;
for (i = 0; i < 5; ++i) {
HistogramView *view = m_histogram->getHistograms()->getHistogramView(i);
histogramViewLayout = static_cast<QVBoxLayout *>(view->layout());
//Don't draw channel numbers
view->channelBar()->setDrawNumbers(false);
for (j = 0; j < 2; ++j) {
EditableMarksBar *editableMarksBar = m_marksBar[j + (i << 1)] = new EditableMarksBar;
MarksBar *marksBar = editableMarksBar->marksBar();
//Set margins up to cover the histogram
editableMarksBar->layout()->setContentsMargins(6, 0, 5, 0);
connect(editableMarksBar, SIGNAL(paramsChanged()), this, SLOT(onParamsChanged()));
histogramViewLayout->insertWidget(1 + (j << 1), editableMarksBar);
}
}
//------------------------- View Widget -------------------------
//NOTE: It's IMPORTANT that parent widget is supplied. It's somewhat
//used by QSplitter to decide the initial widget sizes...
m_viewer = new Swatch(splitter);
m_viewer->setMinimumHeight(150);
m_viewer->setFocusPolicy(Qt::WheelFocus);
splitter->addWidget(m_viewer);
//--------------------------- Buttons ---------------------------
QVBoxLayout *buttonsLayout = new QVBoxLayout(topWidget);
topLayout->addLayout(buttonsLayout);
buttonsLayout->addSpacing(50);
QPushButton *clampRange = new QPushButton(tr("Clamp"), topWidget);
clampRange->setMinimumSize(65, 25);
buttonsLayout->addWidget(clampRange);
connect(clampRange, SIGNAL(clicked(bool)), this, SLOT(clampRange()));
QPushButton *autoAdjust = new QPushButton(tr("Auto"), topWidget);
autoAdjust->setMinimumSize(65, 25);
buttonsLayout->addWidget(autoAdjust);
connect(autoAdjust, SIGNAL(clicked(bool)), this, SLOT(autoAdjust()));
QPushButton *resetBtn = new QPushButton(tr("Reset"), topWidget);
resetBtn->setMinimumSize(65, 25);
buttonsLayout->addWidget(resetBtn);
connect(resetBtn, SIGNAL(clicked(bool)), this, SLOT(reset()));
//.........这里部分代码省略.........
示例12: MdiSubWindow
/**
* Constructor.
*/
InstrumentWindow::InstrumentWindow(const QString &wsName, const QString &label,
ApplicationWindow *app, const QString &name,
Qt::WFlags f)
: MdiSubWindow(app, label, name, f), WorkspaceObserver(),
m_InstrumentDisplay(NULL), m_simpleDisplay(NULL), m_workspaceName(wsName),
m_instrumentActor(NULL), m_surfaceType(FULL3D),
m_savedialog_dir(QString::fromStdString(
Mantid::Kernel::ConfigService::Instance().getString(
"defaultsave.directory"))),
mViewChanged(false), m_blocked(false),
m_instrumentDisplayContextMenuOn(false) {
setFocusPolicy(Qt::StrongFocus);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
QSplitter *controlPanelLayout = new QSplitter(Qt::Horizontal);
// Add Tab control panel
mControlsTab = new QTabWidget(this, 0);
controlPanelLayout->addWidget(mControlsTab);
controlPanelLayout->setSizePolicy(QSizePolicy::Expanding,
QSizePolicy::Expanding);
// Create the display widget
m_InstrumentDisplay = new MantidGLWidget(this);
m_InstrumentDisplay->installEventFilter(this);
connect(this, SIGNAL(enableLighting(bool)), m_InstrumentDisplay,
SLOT(enableLighting(bool)));
// Create simple display widget
m_simpleDisplay = new SimpleWidget(this);
m_simpleDisplay->installEventFilter(this);
QWidget *aWidget = new QWidget(this);
m_instrumentDisplayLayout = new QStackedLayout(aWidget);
m_instrumentDisplayLayout->addWidget(m_InstrumentDisplay);
m_instrumentDisplayLayout->addWidget(m_simpleDisplay);
controlPanelLayout->addWidget(aWidget);
mainLayout->addWidget(controlPanelLayout);
m_xIntegration = new XIntegrationControl(this);
mainLayout->addWidget(m_xIntegration);
connect(m_xIntegration, SIGNAL(changed(double, double)), this,
SLOT(setIntegrationRange(double, double)));
// Set the mouse/keyboard operation info and help button
QHBoxLayout *infoLayout = new QHBoxLayout();
mInteractionInfo = new QLabel();
infoLayout->addWidget(mInteractionInfo);
QPushButton *helpButton = new QPushButton("?");
helpButton->setMaximumWidth(25);
connect(helpButton, SIGNAL(clicked()), this, SLOT(helpClicked()));
infoLayout->addWidget(helpButton);
infoLayout->setStretchFactor(mInteractionInfo, 1);
infoLayout->setStretchFactor(helpButton, 0);
mainLayout->addLayout(infoLayout);
QSettings settings;
settings.beginGroup("Mantid/InstrumentWindow");
// Background colour
setBackgroundColor(
settings.value("BackgroundColor", QColor(0, 0, 0, 1.0)).value<QColor>());
// Create the b=tabs
createTabs(settings);
settings.endGroup();
// Init actions
m_clearPeakOverlays = new QAction("Clear peaks", this);
connect(m_clearPeakOverlays, SIGNAL(activated()), this,
SLOT(clearPeakOverlays()));
confirmClose(app->confirmCloseInstrWindow);
setAttribute(Qt::WA_DeleteOnClose);
// Watch for the deletion of the associated workspace
observePreDelete();
observeAfterReplace();
observeRename();
observeADSClear();
connect(app->mantidUI->getAlgMonitor(), SIGNAL(algorithmStarted(void *)),
this, SLOT(block()));
connect(app->mantidUI->getAlgMonitor(), SIGNAL(allAlgorithmsStopped()), this,
SLOT(unblock()));
const int windowWidth = 800;
const int tabsSize = windowWidth / 4;
QList<int> sizes;
sizes << tabsSize << windowWidth - tabsSize;
controlPanelLayout->setSizes(sizes);
controlPanelLayout->setStretchFactor(0, 0);
controlPanelLayout->setStretchFactor(1, 1);
//.........这里部分代码省略.........
示例13: syntaxList
SyntaxEditorWindow::SyntaxEditorWindow(const QSharedPointer<SyntaxList> &syntaxList, const QString &syntaxName,
const QString &category, const QString &syntaxHint, QWidget *parent) :
QWidget(parent), syntaxList(syntaxList), syntaxName(syntaxName)
{
setWindowRole("kadu-syntax-editor");
setWindowTitle(tr("Kadu syntax editor"));
setAttribute(Qt::WA_DeleteOnClose);
QVBoxLayout *layout = new QVBoxLayout(this);
QSplitter *splitter = new QSplitter(this);
layout->addWidget(splitter);
splitter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
splitter->setChildrenCollapsible(false);
QWidget *splitterleft = new QWidget(splitter);
QVBoxLayout *splitterleftlayout = new QVBoxLayout(splitterleft);
splitterleftlayout->setMargin(0);
splitterleftlayout->setSpacing(5);
editor = new QTextEdit(this);
splitterleftlayout->addWidget(editor);
editor->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
editor->setAcceptRichText(true);
editor->setPlainText(syntaxList->readSyntax(syntaxName));
QFont font = this->font();
font.setFamily("monospace");
if(font.pixelSize() == -1)
font.setPointSizeF(font.pointSizeF() - 0.5);
else
font.setPixelSize(font.pixelSize() - 2);
editor->setFont(font);
editor->setMinimumSize(EDITOR_MINIMUM_SIZE);
if (!syntaxHint.isEmpty())
{
QLabel *editorhint = new QLabel(this);
splitterleftlayout->addWidget(editorhint);
editorhint->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
editorhint->setWordWrap(true);
editorhint->setText(syntaxHint);
}
QWidget *splitterright = new QWidget(splitter);
QVBoxLayout *splitterrightlayout = new QVBoxLayout(splitterright);
splitterrightlayout->setMargin(0);
splitterrightlayout->setSpacing(5);
previewPanel = new Preview(this);
splitterrightlayout->addWidget(previewPanel);
previewPanel->setMinimumHeight(0);
previewPanel->setMaximumHeight(QWIDGETSIZE_MAX);
previewPanel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
previewPanel->setResetBackgroundColor(config_file.readEntry("Look", category + "BgColor"));
previewPanel->setMinimumSize(PREVIEW_MINIMUM_SIZE);
QPushButton *previewbutton = new QPushButton(qApp->style()->standardIcon(QStyle::SP_BrowserReload), tr("Refresh Preview"), this);
splitterrightlayout->addWidget(previewbutton);
connect(previewbutton, SIGNAL(clicked()), this, SLOT(refreshPreview()));
QDialogButtonBox *buttonslayout = new QDialogButtonBox(Qt::Horizontal, this);
layout->addWidget(buttonslayout);
QPushButton *saveSyntax = new QPushButton(qApp->style()->standardIcon(QStyle::SP_DialogOkButton), tr("Save"), this);
QPushButton *saveAsSyntax = new QPushButton(qApp->style()->standardIcon(QStyle::SP_DialogSaveButton), tr("Save as..."), this);
QPushButton *cancel = new QPushButton(qApp->style()->standardIcon(QStyle::SP_DialogCancelButton), tr("Cancel"), this);
buttonslayout->addButton(saveSyntax, QDialogButtonBox::YesRole);
buttonslayout->addButton(saveAsSyntax, QDialogButtonBox::ActionRole);
buttonslayout->addButton(cancel, QDialogButtonBox::RejectRole);
splitter->setSizes( QList<int>() << splitter->sizeHint().width() << 1 );
if (syntaxList->isGlobal(syntaxName))
saveSyntax->setDisabled(true);
else
connect(saveSyntax, SIGNAL(clicked()), this, SLOT(save()));
connect(saveAsSyntax, SIGNAL(clicked()), this, SLOT(saveAs()));
connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
loadWindowGeometry(this, "Look", "SyntaxEditorGeometry", 0, 50, 790, 480);
}
示例14: Dialog
LinesFadePopup::LinesFadePopup()
: Dialog(TApp::instance()->getMainWindow(), true, false, "LinesFade"), m_startRas(0)
{
setWindowTitle(tr("Color Fade"));
setLabelWidth(0);
setModal(false);
setTopMargin(0);
setTopSpacing(0);
beginVLayout();
QSplitter *splitter = new QSplitter(Qt::Vertical);
splitter->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
addWidget(splitter);
endVLayout();
//------------------------- Top Layout --------------------------
QScrollArea *scrollArea = new QScrollArea(splitter);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setWidgetResizable(true);
splitter->addWidget(scrollArea);
splitter->setStretchFactor(0, 1);
QFrame *topWidget = new QFrame(scrollArea);
topWidget->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
scrollArea->setWidget(topWidget);
QGridLayout *topLayout = new QGridLayout(this);
topWidget->setLayout(topLayout);
//------------------------- Parameters --------------------------
//Fade
QLabel *fadeLabel = new QLabel(tr("Fade:"));
topLayout->addWidget(fadeLabel, 0, 0, Qt::AlignRight | Qt::AlignVCenter);
m_linesColorField = new DVGui::ColorField(this, true, TPixel32::Black, 40);
m_linesColorField->setFixedHeight(40);
topLayout->addWidget(m_linesColorField, 0, 1);
//Intensity
QLabel *intensityLabel = new QLabel(tr("Intensity:"));
topLayout->addWidget(intensityLabel, 1, 0, Qt::AlignRight | Qt::AlignVCenter);
m_intensity = new IntField(this);
m_intensity->setValues(100, 0, 100);
topLayout->addWidget(m_intensity, 1, 1);
topLayout->setRowStretch(2, 1);
//--------------------------- Swatch ----------------------------
m_viewer = new Swatch(splitter);
m_viewer->setMinimumHeight(150);
m_viewer->setFocusPolicy(Qt::WheelFocus);
splitter->addWidget(m_viewer);
//--------------------------- Button ----------------------------
m_okBtn = new QPushButton(QString("Apply"), this);
connect(m_okBtn, SIGNAL(clicked()), this, SLOT(apply()));
addButtonBarWidget(m_okBtn);
//------------------------ Connections --------------------------
TApp *app = TApp::instance();
bool ret = true;
ret = ret && connect(m_linesColorField, SIGNAL(colorChanged(const TPixel32 &, bool)),
this, SLOT(onLinesColorChanged(const TPixel32 &, bool)));
ret = ret && connect(m_intensity, SIGNAL(valueChanged(bool)), this, SLOT(onIntensityChanged(bool)));
assert(ret);
m_viewer->resize(0, 350);
resize(600, 500);
}
示例15: grBtoY
scannerwindow::scannerwindow(QList<int> parameters, QMainWindow *parent, bool load, QTextStream* stream):
QObject(parent)
{
this->parameters=parameters;
widget = new QWidget();
widget->setAttribute(Qt::WA_DeleteOnClose);
graph = new Q3DSurface();
container = QWidget::createWindowContainer(graph, widget);
container->setAttribute(Qt::WA_AcceptTouchEvents);
widget->setGeometry(
QStyle::alignedRect(
Qt::LeftToRight,
Qt::AlignTop,
widget->size(),
qApp->desktop()->availableGeometry()
)
);
bitmapForward=new QCustomPlot(widget);
bitmapBackward=new QCustomPlot(widget);
bitmapCombined=new QCustomPlot(widget);
bitmapForward->setContextMenuPolicy(Qt::CustomContextMenu);
bitmapBackward->setContextMenuPolicy(Qt::CustomContextMenu);
bitmapCombined->setContextMenuPolicy(Qt::CustomContextMenu);
bitmapBackward->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bitmapForward->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
bitmapCombined->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
initializeBitmapForward(bitmapForward);
initializeBitmapBackward(bitmapBackward);
initializeBitmapCombined(bitmapCombined);
if (!graph->hasContext()) {
QMessageBox msgBox;
msgBox.setText("Couldn't initialize the OpenGL context.");
msgBox.exec();
}
QSize screenSize = graph->screen()->size();
container->setMinimumSize(QSize(screenSize.width() / 3, screenSize.height()/4));
container->setMaximumSize(screenSize);
container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
container->setFocusPolicy(Qt::StrongFocus);
bitmapBackward->setMinimumSize(screenSize.width()/4, screenSize.height()/4);
bitmapForward->setMinimumSize(screenSize.width()/4, screenSize.height()/4);
bitmapCombined->setMinimumSize(screenSize.width()/4, screenSize.height()/4);
QHBoxLayout *hLayout = new QHBoxLayout(widget);
QVBoxLayout *vLayout = new QVBoxLayout();
QSplitter *hSplitterMain = new QSplitter();
QSplitter *vSplitterRight = new QSplitter();
hLayout->setSizeConstraint(QBoxLayout::SizeConstraint::SetMinimumSize);
vSplitterRight->addWidget(bitmapForward);
vSplitterRight->addWidget(bitmapBackward);
vSplitterRight->addWidget(bitmapCombined);
vSplitterRight->setOrientation(Qt::Orientation::Vertical);
vSplitterRight->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
hSplitterMain->setOrientation(Qt::Orientation::Horizontal);
hSplitterMain->addWidget(container);
hSplitterMain->addWidget(vSplitterRight);
hSplitterMain->setStyleSheet("QSplitter::handle {background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,stop:0 rgba(255, 255, 255, 0),stop:0.407273 rgba(200, 200, 200, 255),stop:0.4825 rgba(101, 104, 113, 235), stop:0.6 rgba(255, 255, 255, 0));}");
vSplitterRight->setStyleSheet("QSplitter::handle {background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,stop:0 rgba(255, 255, 255, 0),stop:0.407273 rgba(200, 200, 200, 255),stop:0.4825 rgba(101, 104, 113, 235), stop:0.6 rgba(255, 255, 255, 0));}");
hLayout->addWidget(hSplitterMain);
hLayout->addLayout(vLayout);
vLayout->setAlignment(Qt::AlignTop);
widget->setWindowTitle(QStringLiteral("AFM Scan"));
QGroupBox *modelGroupBox = new QGroupBox(QStringLiteral("Scan"));
if(!load){
AFM_Scan_3D_RB = new QPushButton(widget);
AFM_Scan_3D_RB->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
AFM_Scan_3D_RB->setText(QStringLiteral("Start Scan"));
AFM_Scan_3D_RB->setCheckable(true);
AFM_Scan_3D_RB->setChecked(false);
}
SaveSurface = new QPushButton(widget);
SaveSurface->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
SaveSurface->setText(QStringLiteral("Save Data"));
BitmapView = new QPushButton(widget);
BitmapView->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred));
//.........这里部分代码省略.........