-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supporting the SpatiaLite Data Provider
2009-04-24 Sandro Furieri <a.furieri@lqt.it> git-svn-id: http://svn.osgeo.org/qgis/trunk@10414 c8812cc2-4d05-0410-92ff-de0c093fc19c
- Loading branch information
esseffe
committed
Mar 24, 2009
1 parent
caa6177
commit 38f8122
Showing
18 changed files
with
3,523 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
# CMake module to search for SpatiaLite library | ||
# | ||
# If it's found it sets SPATIALITE_FOUND to TRUE | ||
# and following variables are set: | ||
# SPATIALITE_INCLUDE_DIR | ||
# SPATIALITE_LIBRARY | ||
|
||
|
||
# FIND_PATH and FIND_LIBRARY normally search standard locations | ||
# before the specified paths. To search non-standard paths first, | ||
# FIND_* is invoked first with specified paths and NO_DEFAULT_PATH | ||
# and then again with no specified paths to search the default | ||
# locations. When an earlier FIND_* succeeds, subsequent FIND_*s | ||
# searching for the same item do nothing. | ||
FIND_PATH(SPATIALITE_INCLUDE_DIR spatialite.h | ||
"$ENV{LIB_DIR}/include" | ||
"$ENV{LIB_DIR}/include/spatialite" | ||
#mingw | ||
c:/msys/local/include | ||
NO_DEFAULT_PATH | ||
) | ||
FIND_PATH(SPATIALITE_INCLUDE_DIR spatialite.h) | ||
|
||
FIND_LIBRARY(SPATIALITE_LIBRARY NAMES spatialite PATHS | ||
"$ENV{LIB_DIR}/lib" | ||
#mingw | ||
c:/msys/local/lib | ||
NO_DEFAULT_PATH | ||
) | ||
FIND_LIBRARY(SPATIALITE_LIBRARY NAMES spatialite) | ||
|
||
IF (SPATIALITE_INCLUDE_DIR AND SPATIALITE_LIBRARY) | ||
SET(SPATIALITE_FOUND TRUE) | ||
ENDIF (SPATIALITE_INCLUDE_DIR AND SPATIALITE_LIBRARY) | ||
|
||
|
||
IF (SPATIALITE_FOUND) | ||
|
||
IF (NOT SPATIALITE_FIND_QUIETLY) | ||
MESSAGE(STATUS "Found SpatiaLite: ${SPATIALITE_LIBRARY}") | ||
ENDIF (NOT SPATIALITE_FIND_QUIETLY) | ||
|
||
ELSE (SPATIALITE_FOUND) | ||
|
||
IF (SPATIALITE_FIND_REQUIRED) | ||
MESSAGE(FATAL_ERROR "Could not find SpatiaLite") | ||
ENDIF (SPATIALITE_FIND_REQUIRED) | ||
|
||
ENDIF (SPATIALITE_FOUND) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ | |
|
||
#cmakedefine HAVE_POSTGRESQL | ||
|
||
#cmakedefine HAVE_SPATIALITE | ||
|
||
#cmakedefine HAVE_PYTHON | ||
|
||
#endif | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*************************************************************************** | ||
qgsspatialitefilterproxymodel.cpp - description | ||
------------------------- | ||
begin : Dec 2008 | ||
copyright : (C) 2008 by Sandro Furieri | ||
email : a.furieri@lqt.it | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#include "qgsspatialitefilterproxymodel.h" | ||
|
||
QgsSpatiaLiteFilterProxyModel::QgsSpatiaLiteFilterProxyModel(QObject * parent):QSortFilterProxyModel(parent) | ||
{ | ||
|
||
} | ||
|
||
QgsSpatiaLiteFilterProxyModel::~QgsSpatiaLiteFilterProxyModel() | ||
{ | ||
|
||
} | ||
|
||
bool QgsSpatiaLiteFilterProxyModel::filterAcceptsRow(int row, const QModelIndex & source_parent) const | ||
{ | ||
//if parent is valid, we have a toplevel item that should be always shown | ||
if (!source_parent.isValid()) | ||
{ | ||
return true; | ||
} | ||
//else we have a row that describes a table and that | ||
//should be tested using the given wildcard/regexp | ||
return QSortFilterProxyModel::filterAcceptsRow(row, source_parent); | ||
} | ||
|
||
void QgsSpatiaLiteFilterProxyModel::_setFilterWildcard(const QString & pattern) | ||
{ | ||
QSortFilterProxyModel::setFilterWildcard(pattern); | ||
emit layoutChanged(); | ||
} | ||
|
||
void QgsSpatiaLiteFilterProxyModel::_setFilterRegExp(const QString & pattern) | ||
{ | ||
QSortFilterProxyModel::setFilterRegExp(pattern); | ||
emit layoutChanged(); | ||
} |
Oops, something went wrong.