Skip to content
Permalink
Browse files

Merge branch 'master' of github.com:qgis/Quantum-GIS

  • Loading branch information
timlinux committed May 26, 2011
2 parents ffc267d + db4fdee commit 27c987014115251771f38e63c1b66b018d8c3325
@@ -131,7 +131,7 @@ endif

# remove unwanted files
rm debian/tmp/usr/share/qgis/doc/api/installdox
rm debian/tmp/usr/share/qgis/doc/api/jquery.js
! [ -f debian/tmp/usr/share/qgis/doc/api/jquery.js ] || rm debian/tmp/usr/share/qgis/doc/api/jquery.js

# Install menu pixmap
install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/pixmaps
@@ -151,6 +151,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
apps/%PACKAGENAME% ^
bin/%PACKAGENAME%.bat.tmpl ^
bin/%PACKAGENAME%-browser.bat.tmpl ^
etc/postinstall/%PACKAGENAME%.bat ^
etc/preremove/%PACKAGENAME%.bat ^
>>%LOG% 2>&1
@@ -159,6 +159,7 @@ tar -C %OSGEO4W_ROOT% -cjf %PACKAGENAME%-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude "apps/%PACKAGENAME%/plugins/grassprovider.dll" ^
apps/%PACKAGENAME% ^
bin/%PACKAGENAME%.bat.tmpl ^
bin/%PACKAGENAME%-browser.bat.tmpl ^
etc/postinstall/%PACKAGENAME%.bat ^
etc/preremove/%PACKAGENAME%.bat ^
>>%LOG% 2>&1
@@ -139,6 +139,8 @@ def getArgsModeMask(self):
arguments << "-q"
arguments << "-cutline"
arguments << mask
if Utils.GdalConfig.version() >= "1.8.0":
arguments << "-crop_to_cutline"
if self.alphaBandCheck.isChecked():
arguments << "-dstalpha"

@@ -838,30 +838,22 @@ void QgsCustomization::removeFromLayout( QLayout *theLayout, QWidget * theWidget

void QgsCustomization::preNotify( QObject * receiver, QEvent * event, bool * done )
{
QWidget *widget = qobject_cast<QWidget*>( receiver );

if ( mEnabled && widget && event->type() == QEvent::Show )
if ( event->type() == QEvent::Show || event->type() == QEvent::MouseButtonPress )
{
QgsCustomization::customizeWidget( widget, event );
if ( widget->inherits( "QDialog" ) && pDialog && pDialog->isVisible() )
QWidget *widget = qobject_cast<QWidget*>( receiver );

if ( mEnabled && widget && event->type() == QEvent::Show )
{
// TODO?
QgsCustomization::customizeWidget( widget, event );
}
}
else if ( mEnabled && widget && ( event->type() == QEvent::Hide || event->type() == QEvent::Close ) )
{
if ( widget->inherits( "QDialog" ) && pDialog && pDialog->isVisible() )
else if ( widget && event->type() == QEvent::MouseButtonPress )
{
// TODO?
}
}
else if ( widget && event->type() == QEvent::MouseButtonPress )
{
QgsDebugMsg( "click" );
if ( pDialog && pDialog->isVisible() )
{
QMouseEvent *e = static_cast<QMouseEvent*>( event );
*done = pDialog->switchWidget( widget, e );
QgsDebugMsg( "click" );
if ( pDialog && pDialog->isVisible() )
{
QMouseEvent *e = static_cast<QMouseEvent*>( event );
*done = pDialog->switchWidget( widget, e );
}
}
}
// Shortcut arrives only if it is defined and used in main app
@@ -109,7 +109,7 @@ string "'"{str_char}*"'"
"||" { return CONCAT; }
[+-/*^] { return yytext[0]; }
[+-/*^%] { return yytext[0]; }
[()] { return yytext[0]; }
@@ -171,6 +171,7 @@ scalar_exp:
}
| scalar_exp '^' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opPOW, $1, $3); joinTmpNodes($$,$1,$3); }
| scalar_exp '*' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMUL, $1, $3); joinTmpNodes($$,$1,$3); }
| scalar_exp '%' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMOD, $1, $3); joinTmpNodes($$,$1,$3); }
| scalar_exp '/' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opDIV, $1, $3); joinTmpNodes($$,$1,$3); }
| scalar_exp '+' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opPLUS, $1, $3); joinTmpNodes($$,$1,$3); }
| scalar_exp '-' scalar_exp { $$ = new QgsSearchTreeNode(QgsSearchTreeNode::opMINUS,$1, $3); joinTmpNodes($$,$1,$3); }
@@ -268,6 +268,7 @@ QString QgsSearchTreeNode::makeSearchString()
case opPLUS: str += "+"; break;
case opMINUS: str += "-"; break;
case opMUL: str += "*"; break;
case opMOD: str += "%"; break;
case opDIV: str += "/"; break;
case opPOW: str += "^"; break;

@@ -781,6 +782,10 @@ QgsSearchTreeValue QgsSearchTreeNode::valueAgainst( const QgsFieldMap& fields, Q
return QgsSearchTreeValue( val1 - val2 );
case opMUL:
return QgsSearchTreeValue( val1 * val2 );
case opMOD:
// NOTE: we _might_ support float operators, like postgresql does
// see 83c94a886c059 commit in postgresql git repo for more info
return QgsSearchTreeValue( int(val1) % int(val2) );
case opDIV:
if ( val2 == 0 )
return QgsSearchTreeValue( 2, "" ); // division by zero
@@ -66,6 +66,7 @@ class CORE_EXPORT QgsSearchTreeNode
opPLUS,
opMINUS,
opMUL,
opMOD,
opDIV,
opPOW,
opSQRT,
@@ -1912,11 +1912,11 @@ void QgsGrassEdit::setCanvasPrompt( QString left, QString mid, QString right )
QgsDebugMsg( "entered." );
mCanvasPrompt = "";
if ( left.length() > 0 )
mCanvasPrompt.append( tr( "Left: %1 " ).arg( left ) );
mCanvasPrompt.append( tr( "Left: %1" ).arg( left ) );
if ( mid.length() > 0 )
mCanvasPrompt.append( tr( "Middle: %1" ).arg( mid ) );
mCanvasPrompt.append( tr( " -- Middle: %1" ).arg( mid ) );
if ( right.length() > 0 )
mCanvasPrompt.append( tr( "Right: %1" ).arg( right ) );
mCanvasPrompt.append( tr( " -- Right: %1" ).arg( right ) );
}

void QgsGrassEdit::attributesClosed()
@@ -228,15 +228,15 @@ void QgsGrassEditNewLine::mouseClick( QgsPoint & point, Qt::MouseButton button )

if ( e->mEditPoints->n_points == 0 )
{
e->setCanvasPrompt( tr( "New point" ), "", "" );
e->setCanvasPrompt( tr( "New vertex" ), "", "" );
}
else if ( e->mEditPoints->n_points == 1 )
{
e->setCanvasPrompt( tr( "New point" ), tr( "Undo last point" ), "" );
e->setCanvasPrompt( tr( "New vertex" ), tr( "Undo last vertex" ), "" );
}
else if ( e->mEditPoints->n_points > 1 )
{
e->setCanvasPrompt( tr( "New point" ), tr( "Undo last point" ), tr( "Close line" ) );
e->setCanvasPrompt( tr( "New vertex" ), tr( "Undo last vertex" ), tr( "Close line" ) );
}
}

0 comments on commit 27c9870

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