本文整理汇总了C++中MarbleWidget::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ MarbleWidget::resize方法的具体用法?C++ MarbleWidget::resize怎么用?C++ MarbleWidget::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MarbleWidget
的用法示例。
在下文中一共展示了MarbleWidget::resize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: captureTour
void TourWidgetPrivate::captureTour()
{
MarbleWidget* widget = new MarbleWidget;
widget->setMapThemeId( m_widget->mapThemeId() );
widget->resize( 1280, 720 );
m_widget->model()->treeModel()->removeDocument(m_document);
widget->model()->treeModel()->addDocument(m_document);
GeoDataTour* tour = findTour( m_document );
TourPlayback* playback = new TourPlayback;
playback->setMarbleWidget( widget );
playback->setTour( tour );
m_tourUi.m_listView->setModel( widget->model()->treeModel() );
if( tour ){
m_tourUi.m_listView->setRootIndex( widget->model()->treeModel()->index( tour->playlist() ) );
m_tourUi.m_listView->repaint();
TourCaptureDialog* tourCaptureDialog = new TourCaptureDialog( widget, m_widget );
tourCaptureDialog->setDefaultFilename( tour->name() );
tourCaptureDialog->setTourPlayback( playback );
tourCaptureDialog->exec();
}
delete playback;
widget->model()->treeModel()->removeDocument(m_document);
m_widget->model()->treeModel()->addDocument(m_document);
updateRootIndex();
delete widget;
}
示例2: main
int main(int argc, char** argv)
{
QApplication app(argc,argv);
// Create a Marble QWidget without a parent
MarbleWidget *mapWidget = new MarbleWidget();
// Load the OpenStreetMap map
mapWidget->setMapThemeId("earth/bluemarble/bluemarble.dgml");
mapWidget->setProjection( Mercator );
// Enable the cloud cover and enable the country borders
mapWidget->setShowClouds( true );
mapWidget->setShowBorders( true );
// Hide the FloatItems: Compass and StatusBar
mapWidget->setShowOverviewMap(false);
mapWidget->setShowScaleBar(false);
foreach ( AbstractFloatItem * floatItem, mapWidget->floatItems() )
if ( floatItem && floatItem->nameId() == "compass" ) {
// Put the compass onto the left hand side
floatItem->setPosition( QPoint( 10, 10 ) );
// Make the content size of the compass smaller
floatItem->setContentSize( QSize( 50, 50 ) );
}
mapWidget->resize( 400, 300 );
mapWidget->show();
return app.exec();
}
示例3: paintEvent
void MarbleWidgetTest::paintEvent()
{
QFETCH( QString, mapThemeId );
MarbleWidget widget;
widget.setMapThemeId( mapThemeId );
widget.resize( 200, 200 );
QCOMPARE( widget.mapThemeId(), mapThemeId );
widget.repaint();
QThreadPool::globalInstance()->waitForDone(); // wait for all runners to terminate
}