Skip to content
Permalink
Browse files

UI overhaul bonanza...hope this doesnt break anything...I guess we sh…

…ould say [FEATURE] at some point as the map composer dialogs have been somewhat overhauled....

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12031 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Nov 8, 2009
1 parent f8c3e42 commit 63dfba89fc6d9b7e89eba9e9aa40c7333a53bffc
@@ -27,7 +27,7 @@ QgsComposerLabelWidget::QgsComposerLabelWidget( QgsComposerLabel* label ): QWidg

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, label );
gridLayout->addWidget( itemPropertiesWidget, 5, 0, 1, 2 );
toolBox->addItem( itemPropertiesWidget, tr( "Item properties" ) );

if ( mComposerLabel )
{
@@ -27,8 +27,8 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend ): m

//add widget for item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, legend );
gridLayout->addWidget( itemPropertiesWidget, 2, 0, 1, 1 );

toolBox->addItem( itemPropertiesWidget, tr( "Item Options") );
if ( legend )
{
mItemTreeView->setModel( legend->model() );
@@ -28,7 +28,7 @@ QgsComposerMapWidget::QgsComposerMapWidget( QgsComposerMap* composerMap ): QWidg

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
gridLayout->addWidget( itemPropertiesWidget );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );
QDoubleValidator v( 0 );

mWidthLineEdit->setValidator( &v );
@@ -35,7 +35,7 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture* picture

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, picture );
gridLayout->addWidget( itemPropertiesWidget, 8, 0, 1, 4 );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );

mWidthLineEdit->setValidator( new QDoubleValidator( this ) );
mHeightLineEdit->setValidator( new QDoubleValidator( this ) );
@@ -28,7 +28,7 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar* scale

//add widget for general composer item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, scaleBar );
gridLayout->addWidget( itemPropertiesWidget );
toolBox->addItem( itemPropertiesWidget, tr( "General options" ) );

blockMemberSignals( true );
mStyleComboBox->insertItem( 0, tr( "Single Box" ) );
@@ -466,6 +466,7 @@ QgisApp::QgisApp( QSplashScreen *splash, QWidget * parent, Qt::WFlags fl )
QgsDebugMsg( QgsApplication::showSettings() );
QgsDebugMsg( "\n--------------------------\n\n\n" );
mMapCanvas->freeze( false );
mLastComposerId = 0;
} // QgisApp ctor


@@ -3690,26 +3691,8 @@ void QgisApp::newPrintComposer()
}

//ask user about name
bool composerExists = true;
QString composerId;
while ( composerExists )
{
composerId = QInputDialog::getText( 0, tr( "Enter id string for composer" ), tr( "id:" ) );
if ( composerId.isNull() )
{
return;
}

if ( mPrintComposers.contains( composerId ) )
{
QMessageBox::critical( 0, tr( "Composer id already exists" ), tr( "The entered composer id '%1' already exists. Please enter a different id" ).arg( composerId ) );
}
else
{
composerExists = false;
}
}

mLastComposerId++;
QString composerId = QString( tr("Map Composer %1").arg( mLastComposerId ) );
//create new composer object
QgsComposer* newComposerObject = new QgsComposer( this, composerId );
//add it to the map of existing print composers
@@ -4244,6 +4227,7 @@ bool QgisApp::loadComposersFromProject( const QString& projectFilePath )
composer->showMinimized();
composer->zoomFull();
}
mLastComposerId = composerNodes.size();

return true;
}
@@ -4256,6 +4240,7 @@ void QgisApp::deletePrintComposers()
delete it.value();
}
mPrintComposers.clear();
mLastComposerId = 0;
}

void QgisApp::mergeSelectedFeatures()
@@ -991,6 +991,7 @@ class QgisApp : public QMainWindow

QgsUndoWidget* mUndoWidget;

int mLastComposerId;
};

#endif
@@ -6,119 +6,94 @@
<rect>
<x>0</x>
<y>0</y>
<width>215</width>
<height>434</height>
<width>236</width>
<height>314</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QGroupBox" name="mComposerItemPropertiesGroupBox">
<property name="title">
<string>Composer item properties</string>
<widget class="QPushButton" name="mFrameColorButton">
<property name="text">
<string>Frame color...</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="mColorLabel">
<property name="text">
<string>Color</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mFrameColorButton</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="mFrameColorButton">
<property name="text">
<string>Frame...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="mBackgroundColorButton">
<property name="text">
<string>Background...</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Opacity</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOpacitySlider</cstring>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Outline width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
<item row="7" column="0">
<widget class="QPushButton" name="mPositionButton">
<property name="text">
<string>Position...</string>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QCheckBox" name="mFrameCheckBox">
<property name="text">
<string>Show frame</string>
</property>
</widget>
</item>
<item row="9" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="mBackgroundColorButton">
<property name="text">
<string>Background color...</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="mOpacityLabel">
<property name="text">
<string>Opacity</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOpacitySlider</cstring>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QSlider" name="mOpacitySlider">
<property name="maximum">
<number>255</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="mOutlineWidthLabel">
<property name="text">
<string>Outline width</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="buddy">
<cstring>mOutlineWidthSpinBox</cstring>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QDoubleSpinBox" name="mOutlineWidthSpinBox"/>
</item>
<item row="6" column="0">
<widget class="QPushButton" name="mPositionButton">
<property name="text">
<string>Position...</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QCheckBox" name="mFrameCheckBox">
<property name="text">
<string>Show frame</string>
</property>
</widget>
</item>
<item row="8" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>215</width>
<height>57</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>

0 comments on commit 63dfba8

Please sign in to comment.
You can’t perform that action at this time.