Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
124 changed files
with
7,473 additions
and
673 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
BIN
+968 Bytes
images/themes/default/customization/calendarwidget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+817 Bytes
images/themes/default/customization/checkbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+518 Bytes
images/themes/default/customization/columnview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+853 Bytes
images/themes/default/customization/combobox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+672 Bytes
images/themes/default/customization/dateedit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+978 Bytes
images/themes/default/customization/dial.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+1003 Bytes
images/themes/default/customization/dialogbuttonbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+638 Bytes
images/themes/default/customization/dockwidget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+749 Bytes
images/themes/default/customization/doublespinbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+966 Bytes
images/themes/default/customization/fontcombobox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+721 Bytes
images/themes/default/customization/frame.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+439 Bytes
images/themes/default/customization/groupbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+408 Bytes
images/themes/default/customization/hscrollbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+729 Bytes
images/themes/default/customization/hslider.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+164 Bytes
images/themes/default/customization/hsplit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+953 Bytes
images/themes/default/customization/label.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+555 Bytes
images/themes/default/customization/lcdnumber.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+287 Bytes
images/themes/default/customization/line.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+405 Bytes
images/themes/default/customization/lineedit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+797 Bytes
images/themes/default/customization/listbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+756 Bytes
images/themes/default/customization/listview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+643 Bytes
images/themes/default/customization/mdiarea.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+807 Bytes
images/themes/default/customization/plaintextedit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+559 Bytes
images/themes/default/customization/progress.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+408 Bytes
images/themes/default/customization/pushbutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+586 Bytes
images/themes/default/customization/radiobutton.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+548 Bytes
images/themes/default/customization/scrollarea.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+686 Bytes
images/themes/default/customization/spacer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+680 Bytes
images/themes/default/customization/spinbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+623 Bytes
images/themes/default/customization/tabbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+483 Bytes
images/themes/default/customization/table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+572 Bytes
images/themes/default/customization/tabwidget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+823 Bytes
images/themes/default/customization/textedit.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+783 Bytes
images/themes/default/customization/toolbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+314 Bytes
images/themes/default/customization/vline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+415 Bytes
images/themes/default/customization/vscrollbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+726 Bytes
images/themes/default/customization/vslider.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+677 Bytes
images/themes/default/customization/vspacer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+716 Bytes
images/themes/default/customization/widget.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+828 Bytes
images/themes/default/customization/widgetstack.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+898 Bytes
images/themes/default/customization/wizard.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+2.62 KB
images/themes/default/mIconWms.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN
+2.09 KB
images/themes/default/mIconWmsLayer.png
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# 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. | ||
|
||
""" | ||
Reads .ui files from ../src/ui/ directory and write to stdout an XML describing | ||
widgets tree. | ||
Python bindings must be compiled and in PYTHONPATH | ||
QGIS libraries must be in LD_LIBRARY_PATH | ||
Output should go to ../resources/customization.xml | ||
""" | ||
|
||
import sys | ||
import os, glob, imp | ||
from PyQt4.QtGui import * | ||
from PyQt4.uic import loadUi, compileUi | ||
from xml.etree.ElementTree import Element, SubElement, Comment, tostring | ||
from xml.dom import minidom | ||
|
||
# qwt_plot is missing somehow but it may depend on installed packages | ||
from PyQt4 import Qwt5 as qwt_plot | ||
sys.modules['qwt_plot'] = qwt_plot | ||
|
||
# loadUi is looking for custom widget in module which is lowercase version of | ||
# the class, which do not exist (AFAIK) -> preload them, problems anyway: | ||
# missing in gui: QgsColorRampComboBox, QgsRendererRulesTreeWidget, | ||
# QgsRendererRulesTreeWidget, QgsAttributeTableView | ||
# and QgsProjectionSelector cannot open db file | ||
from qgis import gui | ||
for m in ['qgscolorbutton', 'qgscolorrampcombobox', 'qgsprojectionselector', 'qgslabelpreview', 'qgsrulebasedrendererv2widget', 'qgsattributetableview' ]: | ||
sys.modules[m] = gui | ||
|
||
class UiInspector: | ||
def __init__(self ): | ||
self.ui_dir = os.path.abspath ( os.path.join( os.path.dirname(__file__) , '../src/ui/*.ui' ) ) | ||
self.printMsg ( "Loading UI files " + self.ui_dir ) | ||
# list of widget classes we want to follow | ||
self.follow = [ | ||
QWidget, QDialog, | ||
QCheckBox, QComboBox, QDial, QPushButton, QLabel, QLCDNumber, QLineEdit, QRadioButton, QScrollBar, QSlider, QSpinBox, QTextEdit, | ||
QDateEdit, QTimeEdit, QDateTimeEdit, QListView, QProgressBar, QTableView, QTabWidget, QTextBrowser, QDialogButtonBox, | ||
QScrollArea, QGroupBox, QStackedWidget, | ||
] | ||
|
||
def printMsg ( self, msg ): | ||
sys.stderr.write( msg + "\n" ) | ||
|
||
def widgetXml(self, element, widget, level = 0, label = None ): | ||
#print tostring ( element ) | ||
#self.printMsg ( "class: " + str( type ( widget ) ) ) | ||