Skip to content

Commit

Permalink
UI overhaul bonanza...hope this doesnt break anything...I guess we sh…
Browse files Browse the repository at this point in the history
…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 committed Nov 8, 2009
1 parent f8c3e42 commit 63dfba8
Show file tree
Hide file tree
Showing 23 changed files with 1,273 additions and 1,263 deletions.
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerlabelwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down
4 changes: 2 additions & 2 deletions src/app/composer/qgscomposerlegendwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposermapwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerpicturewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
Expand Down
2 changes: 1 addition & 1 deletion src/app/composer/qgscomposerscalebarwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) );
Expand Down
25 changes: 5 additions & 20 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -4244,6 +4227,7 @@ bool QgisApp::loadComposersFromProject( const QString& projectFilePath )
composer->showMinimized();
composer->zoomFull();
}
mLastComposerId = composerNodes.size();

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

void QgisApp::mergeSelectedFeatures()
Expand Down
1 change: 1 addition & 0 deletions src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ class QgisApp : public QMainWindow

QgsUndoWidget* mUndoWidget;

int mLastComposerId;
};

#endif
183 changes: 79 additions & 104 deletions src/ui/qgscomposeritemwidgetbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -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/>
Expand Down
Loading

0 comments on commit 63dfba8

Please sign in to comment.