Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
QGIS By Example

You're reading from   QGIS By Example Leverage the power of QGIS in real-world applications to become a powerful user in cartography and GIS analysis

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781782174677
Length 316 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Handling Your Data FREE CHAPTER 2. Visualizing and Styling the Data 3. Presenting Data on a Print Map 4. Publishing the Map Online 5. Answering Questions with Density Analysis 6. Answering Questions with Visibility Analysis 7. Answering Questions with Suitability Analysis 8. Automating Analysis with Processing Models 9. Automating Analysis with Processing Scripts 10. Developing a Python Plugin – Select by Radius Index

Designing the plugin's GUI


Our plugin will have two dialogs: one is the main plugin dialog, which will be used to accept user input, and the second is the so-called About dialog, with some information about the plugin.

The Qt framework, on top of which QGIS is built, provides a special program for designing dialogs and other UI elements, such as dock widgets. It is called Qt Designer. Qt Designer is a user-friendly and easy-to-use visual form designer. With its help, you can create a dialog without writing code, by placing GUI widgets on the form using your mouse. The form definition in XML format is then saved in a .ui file, which is used by the plugin or application to construct a user interface.

To keep the plugin's structure clean, we will put all the .ui files in a separate subdirectory, called ui for example, in the plugin source tree.

Designing the About dialog

Start Qt Designer. In the New form welcome dialog, select the template called Dialog with Buttons Bottom, like this:

If this dialog...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image