本文整理汇总了C++中QLayout::margin方法的典型用法代码示例。如果您正苦于以下问题:C++ QLayout::margin方法的具体用法?C++ QLayout::margin怎么用?C++ QLayout::margin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QLayout
的用法示例。
在下文中一共展示了QLayout::margin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCurrentDataset
//.........这里部分代码省略.........
bWavelengthsPageActive = true;
}
int index = mpTabWidget->indexOf(mpWavelengthsPage);
if (index != -1)
{
mpTabWidget->removeTab(index);
}
if (pRasterFileDescriptor != NULL)
{
// Populate the wavelengths with the file descriptor bands since the metadata wavelengths
// apply to all bands in the file
mpWavelengthsPage->setWavelengths(pRasterFileDescriptor->getBands(), mpEditDescriptor->getMetadata());
if (pRasterDescriptor != NULL)
{
mpWavelengthsPage->highlightActiveBands(pRasterDescriptor->getBands());
}
mpTabWidget->addTab(mpWavelengthsPage, "Wavelengths");
if (bWavelengthsPageActive == true)
{
mpTabWidget->setCurrentWidget(mpWavelengthsPage);
}
}
// Importer page
bool bImporterPageActive = false;
if (mpImporterPage != NULL)
{
if (mpTabWidget->currentWidget() == mpImporterPage)
{
bImporterPageActive = true;
}
}
removeImporterPage();
if (mpImporter != NULL)
{
mpImporterPage = mpImporter->getImportOptionsWidget(mpEditDescriptor);
if (mpImporterPage != NULL)
{
QLayout* pLayout = mpImporterPage->layout();
if (pLayout != NULL)
{
if (pLayout->margin() <= 0)
{
pLayout->setMargin(10);
}
}
QString strCaption = mpImporterPage->windowTitle();
if (strCaption.isEmpty() == true)
{
strCaption = "Importer";
}
mpTabWidget->addTab(mpImporterPage, strCaption);
if (bImporterPageActive == true)
{
mpTabWidget->setCurrentWidget(mpImporterPage);
}
}
// Set the valid processing locations on the data page. This must be done after getting the import options
// widget from the importer so that the auto importer will correctly query the importer that is used.
// This can be changed if the importer design (and auto importer) is modified to support valid processing
// locations for a specific data set.
vector<ProcessingLocation> locations;
if (mpImporter->isProcessingLocationSupported(IN_MEMORY) == true)
{
locations.push_back(IN_MEMORY);
}
if (mpImporter->isProcessingLocationSupported(ON_DISK) == true)
{
locations.push_back(ON_DISK);
}
if (mpImporter->isProcessingLocationSupported(ON_DISK_READ_ONLY) == true)
{
locations.push_back(ON_DISK_READ_ONLY);
}
mpDataPage->setValidProcessingLocations(locations);
}
// Validate the current data descriptor
validateEditDataset();
// Reconnect the pages
updateConnections(true);
// Notify connected objects
emit currentDatasetChanged(mpCurrentDataset);
}