Skip to content
Permalink
Browse files
automatic indentation update (r11371-r12139)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12141 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 16, 2009
1 parent 55c3c7b commit b3f8270dda95c68ad7e947e21e973bad1eef22da
Showing with 740 additions and 731 deletions.
  1. +15 −7 src/app/attributetable/qgsattributetabledialog.cpp
  2. +2 −2 src/app/composer/qgscomposerlegendwidget.cpp
  3. +105 −105 src/app/composer/qgscomposermanager.cpp
  4. +18 −18 src/app/composer/qgscomposermanager.h
  5. +18 −18 src/app/legend/qgslegend.cpp
  6. +1 −1 src/app/legend/qgslegend.h
  7. +1 −1 src/app/legend/qgslegendgroup.cpp
  8. +3 −3 src/app/legend/qgslegendlayer.cpp
  9. +2 −2 src/app/ogr/qgsnewogrconnection.cpp
  10. +2 −2 src/app/qgisapp.cpp
  11. +1 −1 src/app/qgsabout.cpp
  12. +1 −1 src/app/qgsattributedialog.cpp
  13. +12 −12 src/app/qgsattributeeditor.cpp
  14. +3 −3 src/app/qgsattributetypedialog.cpp
  15. +1 −1 src/app/qgsattributetypedialog.h
  16. +3 −3 src/app/qgsclipboard.cpp
  17. +36 −36 src/app/qgsconfigureshortcutsdialog.cpp
  18. +4 −4 src/app/qgsgraduatedsymboldialog.cpp
  19. +1 −1 src/app/qgsidentifyresults.cpp
  20. +1 −1 src/app/qgsmapserverexport.cpp
  21. +1 −1 src/app/qgsnewconnection.cpp
  22. +2 −2 src/app/qgspastetransformations.cpp
  23. +2 −2 src/app/qgspgsourceselect.cpp
  24. +1 −1 src/app/qgspgsourceselect.h
  25. +1 −1 src/app/qgsquerybuilder.cpp
  26. +2 −2 src/app/qgssinglesymboldialog.cpp
  27. +2 −2 src/app/qgsspatialitesourceselect.cpp
  28. +9 −9 src/app/qgsuniquevaluedialog.cpp
  29. +30 −30 src/app/qgsvectorlayerproperties.cpp
  30. +2 −2 src/app/qgswmssourceselect.cpp
  31. +3 −3 src/plugins/diagram_overlay/qgsdiagramdialog.cpp
  32. +3 −3 src/plugins/evis/eventbrowser/evisimagedisplaywidget.cpp
  33. +1 −1 src/plugins/georeferencer/mapcoordsdialog.cpp
  34. +12 −12 src/plugins/labeling/engineconfigdialog.cpp
  35. +5 −5 src/plugins/labeling/engineconfigdialog.h
  36. +37 −37 src/plugins/labeling/labeling.cpp
  37. +1 −1 src/plugins/labeling/labeling.h
  38. +96 −95 src/plugins/labeling/labelinggui.cpp
  39. +2 −2 src/plugins/labeling/labelinggui.h
  40. +13 −13 src/plugins/labeling/labelpreview.cpp
  41. +9 −9 src/plugins/labeling/labelpreview.h
  42. +188 −188 src/plugins/labeling/pallabeling.cpp
  43. +76 −76 src/plugins/labeling/pallabeling.h
  44. +2 −2 src/plugins/oracle_raster/qgsselectgeoraster_ui.cpp
  45. +10 −10 src/python/qgspythonutilsimpl.cpp
@@ -389,7 +389,7 @@ void QgsAttributeTableDialog::updateRowSelection( int first, int last, int click
if ( clickType == 0 ) // Single click
{
if ( mSelectedFeatures.size() == 1 && wasSelected ) // One item selected
return; // Click over a selected item doesn't do anything
return; // Click over a selected item doesn't do anything

mView->setCurrentIndex( mFilterModel->index( first, 0 ) );
mView->selectRow( first );
@@ -418,10 +418,14 @@ void QgsAttributeTableDialog::updateRowSelection( int first, int last, int click

// Remove items in mSelectedFeatures if they aren't in mNewSelection
QgsFeatureIds::Iterator it = mSelectedFeatures.begin();
while ( it != mSelectedFeatures.end() ) {
if ( !newSelection.contains( *it ) ) {
while ( it != mSelectedFeatures.end() )
{
if ( !newSelection.contains( *it ) )
{
it = mSelectedFeatures.erase( it );
} else {
}
else
{
++it;
}
}
@@ -461,10 +465,14 @@ void QgsAttributeTableDialog::updateRowSelection( int first, int last, int click

// Remove items in mSelectedFeatures if they aren't in mNewSelection
QgsFeatureIds::Iterator it = mSelectedFeatures.begin();
while ( it != mSelectedFeatures.end() ) {
if ( !newSelection.contains( *it ) ) {
while ( it != mSelectedFeatures.end() )
{
if ( !newSelection.contains( *it ) )
{
it = mSelectedFeatures.erase( it );
} else {
}
else
{
++it;
}
}
@@ -27,8 +27,8 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend* legend ): m

//add widget for item properties
QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, legend );
toolBox->addItem( itemPropertiesWidget, tr( "Item Options") );
toolBox->addItem( itemPropertiesWidget, tr( "Item Options" ) );

if ( legend )
{
mItemTreeView->setModel( legend->model() );
@@ -21,11 +21,11 @@
#include <QListWidgetItem>
#include <QMessageBox>

QgsComposerManager::QgsComposerManager(QgisApp* app, QWidget * parent, Qt::WindowFlags f): QDialog(parent, f), mQgisApp(app)
QgsComposerManager::QgsComposerManager( QgisApp* app, QWidget * parent, Qt::WindowFlags f ): QDialog( parent, f ), mQgisApp( app )
{
setupUi(this);
connect(mButtonBox, SIGNAL(rejected()), this, SLOT(close()));
initialize();
setupUi( this );
connect( mButtonBox, SIGNAL( rejected() ), this, SLOT( close() ) );
initialize();
}

QgsComposerManager::~QgsComposerManager()
@@ -35,125 +35,125 @@ QgsComposerManager::~QgsComposerManager()

void QgsComposerManager::initialize()
{
if(!mQgisApp)
{
return;
}

QSet<QgsComposer*> composers = mQgisApp->printComposers();
QSet<QgsComposer*>::const_iterator it = composers.constBegin();
for(; it != composers.constEnd(); ++it)
{
QListWidgetItem* item = new QListWidgetItem((*it)->title(), mComposerListWidget);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable);
mItemComposerMap.insert(item, *it);
}
if ( !mQgisApp )
{
return;
}

QSet<QgsComposer*> composers = mQgisApp->printComposers();
QSet<QgsComposer*>::const_iterator it = composers.constBegin();
for ( ; it != composers.constEnd(); ++it )
{
QListWidgetItem* item = new QListWidgetItem(( *it )->title(), mComposerListWidget );
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable );
mItemComposerMap.insert( item, *it );
}
}

void QgsComposerManager::on_mAddButton_clicked()
{
if(!mQgisApp)
{
return;
}
QgsComposer* newComposer = mQgisApp->createNewComposer();
if(!newComposer)
{
return;
}
QListWidgetItem* item = new QListWidgetItem(newComposer->title(), mComposerListWidget);
item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable);
mItemComposerMap.insert(item, newComposer);
if ( !mQgisApp )
{
return;
}
QgsComposer* newComposer = mQgisApp->createNewComposer();
if ( !newComposer )
{
return;
}
QListWidgetItem* item = new QListWidgetItem( newComposer->title(), mComposerListWidget );
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable );
mItemComposerMap.insert( item, newComposer );
}

void QgsComposerManager::on_mRemoveButton_clicked()
{
if(!mQgisApp)
{
return;
}

QListWidgetItem* item = mComposerListWidget->currentItem();
if(!item)
{
return;
}

//ask for confirmation
if(QMessageBox::warning(0, tr("Remove composer"), tr("Do you really want to remove the map composer '%1'?").arg(item->text()), QMessageBox::Ok | QMessageBox::Cancel) != QMessageBox::Ok)
{
return;
}

//delete composer
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find(item);
if(it != mItemComposerMap.end())
{
mQgisApp->deleteComposer(it.value());
}
mItemComposerMap.remove(item);
mComposerListWidget->removeItemWidget(item);
//and remove the list widget row
delete (mComposerListWidget->takeItem(mComposerListWidget->row(item)));
if ( !mQgisApp )
{
return;
}

QListWidgetItem* item = mComposerListWidget->currentItem();
if ( !item )
{
return;
}

//ask for confirmation
if ( QMessageBox::warning( 0, tr( "Remove composer" ), tr( "Do you really want to remove the map composer '%1'?" ).arg( item->text() ), QMessageBox::Ok | QMessageBox::Cancel ) != QMessageBox::Ok )
{
return;
}

//delete composer
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find( item );
if ( it != mItemComposerMap.end() )
{
mQgisApp->deleteComposer( it.value() );
}
mItemComposerMap.remove( item );
mComposerListWidget->removeItemWidget( item );
//and remove the list widget row
delete( mComposerListWidget->takeItem( mComposerListWidget->row( item ) ) );
}

void QgsComposerManager::on_mShowPushButton_clicked()
{
if(!mQgisApp)
{
return;
}

QListWidgetItem* item = mComposerListWidget->currentItem();
if(!item)
{
return;
}

//delete composer
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find(item);
if(it != mItemComposerMap.end())
{
it.value()->show();
it.value()->activate();
it.value()->stackUnder(this);
}
if ( !mQgisApp )
{
return;
}

QListWidgetItem* item = mComposerListWidget->currentItem();
if ( !item )
{
return;
}

//delete composer
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find( item );
if ( it != mItemComposerMap.end() )
{
it.value()->show();
it.value()->activate();
it.value()->stackUnder( this );
}
}

void QgsComposerManager::on_mRenamePushButton_clicked()
{
QListWidgetItem* item = mComposerListWidget->currentItem();
if(!item)
{
return;
}

QString currentTitle;
QgsComposer* currentComposer = 0;
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find(item);
if(it != mItemComposerMap.end())
{
currentComposer = it.value();
currentTitle = it.value()->title();
}
else
{
return;
}
QString newTitle = QInputDialog::getText(0, tr("Change title"), tr("Title"), QLineEdit::Normal, currentTitle );
if(newTitle.isNull())
{
return;
}
currentComposer->setTitle(newTitle);
item->setText(newTitle);
QListWidgetItem* item = mComposerListWidget->currentItem();
if ( !item )
{
return;
}

QString currentTitle;
QgsComposer* currentComposer = 0;
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find( item );
if ( it != mItemComposerMap.end() )
{
currentComposer = it.value();
currentTitle = it.value()->title();
}
else
{
return;
}
QString newTitle = QInputDialog::getText( 0, tr( "Change title" ), tr( "Title" ), QLineEdit::Normal, currentTitle );
if ( newTitle.isNull() )
{
return;
}
currentComposer->setTitle( newTitle );
item->setText( newTitle );
}

void QgsComposerManager::on_mComposerListWidget_itemChanged( QListWidgetItem * item )
{
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find(item);
if(it != mItemComposerMap.end())
{
it.value()->setTitle(item->text());
}
QMap<QListWidgetItem*, QgsComposer*>::iterator it = mItemComposerMap.find( item );
if ( it != mItemComposerMap.end() )
{
it.value()->setTitle( item->text() );
}
}
@@ -28,24 +28,24 @@ instances and change title of existing ones*/
class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
{
Q_OBJECT
public:
QgsComposerManager(QgisApp* app, QWidget * parent = 0, Qt::WindowFlags f = 0);
~QgsComposerManager();


private:
QgisApp* mQgisApp;
/**Stores the relation between items and composer pointers */
QMap<QListWidgetItem*, QgsComposer*> mItemComposerMap;
/**Enters the composer instances and created the item-composer map*/
void initialize();

private slots:
void on_mAddButton_clicked();
void on_mRemoveButton_clicked();
void on_mShowPushButton_clicked();
void on_mRenamePushButton_clicked();
void on_mComposerListWidget_itemChanged( QListWidgetItem * item );
public:
QgsComposerManager( QgisApp* app, QWidget * parent = 0, Qt::WindowFlags f = 0 );
~QgsComposerManager();


private:
QgisApp* mQgisApp;
/**Stores the relation between items and composer pointers */
QMap<QListWidgetItem*, QgsComposer*> mItemComposerMap;
/**Enters the composer instances and created the item-composer map*/
void initialize();

private slots:
void on_mAddButton_clicked();
void on_mRemoveButton_clicked();
void on_mShowPushButton_clicked();
void on_mRenamePushButton_clicked();
void on_mComposerListWidget_itemChanged( QListWidgetItem * item );
};

#endif // QGSCOMPOSERMANAGER_H

0 comments on commit b3f8270

Please sign in to comment.