37 #include <QApplication> 38 #include <QMessageBox> 50 #ifdef TERRALIB_MOD_OGR_ENABLED 56 #ifdef TERRALIB_MOD_GDAL_ENABLED 64 int main(
int argc,
char** argv)
73 qRegisterMetaType<QImage>(
"QImage");
76 QStringList ithemes = QIcon::themeSearchPaths();
78 QIcon::setThemeName(
"terralib");
79 QIcon::setThemeSearchPaths(ithemes);
84 QString text = QString::fromUtf8(
"<p>Here you have a Map Display component associated with a set of geographic tools.\ 85 <p>There are somes tools always active. e.g.:\ 86 <ul><li><b>CoordTracking:</b> move the mouse on Map Display and see the tracked geographic coordinate on status bar;</li>\ 87 <li><b>ZoomWheel:</b> use the mouse wheel to performs a zoom on MapDisplay;</li>\ 88 <li><b>ZoomKeyboard:</b> you can use the keys (+) / (Up) or (-) / (Down) to performs a zoom also.</li>\ 90 <p>Some tools can be activated using the tool bar. e.g.\ 91 <ul><li><b>Pan:</b> click on MapDisplay using the left mouse button. Keep the button hold and move. Release the button to perform a pan;</li>\ 92 <li><b>ZoomIn:</b> click on MapDisplay using the left mouse button. You will perform a zoom in on clicked point;</li>\ 93 <li><b>ZoomOut:</b> click on MapDisplay using the left mouse button. You will perform a zoom out on clicked point;</li>\ 94 <li><b>ZoomArea:</b> click on MapDisplay using the left mouse button. Keep the button hold and move to define a boundary rectangle. Release the button to perform a zoom in on this area;</li>\ 95 <li><b>Measure:</b> you can measure distance, area and angles. Try it!\ 96 Select the specified tool. Click on MapDisplay using the left mouse button to fix a point. Move the mouse to see a geometry and the measured value.\ 97 Double click left button to stop the measuring.</li>\ 99 <p>Finally, this example also provides a tool called <b>Selection</b>.<br>\ 100 The only purpose of this tool is to show how you can implement a new tool.<br>\ 101 Do not consider it as a final application!<br>\ 102 So, select it and click with the left button. You will see the feature attributes.\ 106 QMessageBox instructions;
107 instructions.setWindowTitle(
"Information");
108 instructions.setText(text);
109 instructions.setTextFormat(Qt::RichText);
110 instructions.setWindowModality(Qt::NonModal);
111 instructions.move(0, 0);
122 std::cout << std::endl <<
"An unexpected exception has occurred!" << std::endl;
Include files for Core Plugin Library.
void insert(const PluginInfo &pinfo)
Adds plugin with its plugin information to the list of unloaded plugins.
Basic information about a plugin.
int main(int argc, char **argv)
void load(const std::string &plugin_name, const bool start=true)
It tries to load the informed plugin.
std::string name
The plugin name: an internal value used to identify the plugin in the system. Must be a unique value...
void LoadModules()
It loads the data source drivers.
static PluginManager & instance()
Access the singleton.
void finalize()
It finalizes the TerraLib Platform.
static TerraLib & getInstance()
It returns a reference to the singleton instance.
void initialize()
It initializes the TerraLib Platform.
TECOREEXPORT PluginInfo JSONPluginInfoSerializer(const std::string &file_name)
A plugin finder that search for plugins in some special directories defined by compile time macros...
TECOREEXPORT std::string FindInTerraLibPath(const std::string &path)
Returns the path relative to a directory or file in the context of TerraLib.
This file contains include headers for the TerraLib Common Runtime module.
void clear()
Stop and unload all plugins, then clear the internal list of plugins.
A simple main window to show example of TerraLib Qt Tools.