| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| call "%OSGEO4W_ROOT%"\bin\o4w_env.bat | ||
| path %PATH%;%OSGEO4W_ROOT%\apps\@package@\bin | ||
| set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/@package@ | ||
| "%OSGEO4W_ROOT%"\apps\@package@\crssync |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
|
|
||
| # for included scripts that set policies | ||
| INSTALL (CODE "cmake_policy(SET CMP0011 NEW)") | ||
|
|
||
| CONFIGURE_FILE("PostInstall.cmake.in" "PostInstall.cmake" @ONLY) | ||
| INSTALL(SCRIPT "${CMAKE_BINARY_DIR}/postinstall/PostInstall.cmake") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
|
|
||
| # kill boolean warnings | ||
| CMAKE_POLICY(SET CMP0012 NEW) | ||
|
|
||
| IF(@WITH_PY_COMPILE@) | ||
| MESSAGE(STATUS "Byte-compiling core Python utilities and plugins...") | ||
| # exclude Python 3 modules in PyQt4.uic package | ||
| EXECUTE_PROCESS(COMMAND @PYTHON_EXECUTABLE@ -m compileall -q -x ".*uic.port_v3.*" "@CMAKE_INSTALL_PREFIX@/@QGIS_DATA_DIR@/python") | ||
| ENDIF(@WITH_PY_COMPILE@) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| ADD_SUBDIRECTORY(console_help) | ||
|
|
||
| SET(PYTHON_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/python) | ||
| SET(QGIS_PYTHON_DIR ${PYTHON_SITE_PACKAGES_DIR}/qgis) | ||
|
|
||
| # PyQGIS console files to copy to staging or install | ||
| SET(PY_CONSOLE_FILES | ||
| console.py | ||
| console_sci.py | ||
| console_help.py | ||
| console_settings.py | ||
| console_output.py | ||
| ) | ||
|
|
||
| FILE(GLOB UI_FILES *.ui) | ||
| PYQT4_WRAP_UI(PYUI_FILES ${UI_FILES}) # returns absolute paths | ||
| ADD_CUSTOM_TARGET(pyconsole ALL DEPENDS ${PYUI_FILES}) | ||
|
|
||
| # stage to output to make available when QGIS is run from build directory | ||
| FOREACH(pyfile ${PY_CONSOLE_FILES} ${PYUI_FILES}) | ||
| ADD_CUSTOM_COMMAND(TARGET pyconsole | ||
| POST_BUILD | ||
| COMMAND ${CMAKE_COMMAND} -E copy ${pyfile} "${QGIS_PYTHON_OUTPUT_DIRECTORY}" | ||
| WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
| DEPENDS ${pyfile} | ||
| ) | ||
| ENDFOREACH(pyfile) | ||
|
|
||
| INSTALL(FILES ${PY_CONSOLE_FILES} ${PYUI_FILES} DESTINATION "${QGIS_PYTHON_DIR}") | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <ui version="4.0"> | ||
| <class>Help</class> | ||
| <widget class="QDialog" name="Help"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>0</x> | ||
| <y>0</y> | ||
| <width>555</width> | ||
| <height>363</height> | ||
| </rect> | ||
| </property> | ||
| <property name="windowTitle"> | ||
| <string>Dialog</string> | ||
| </property> | ||
| <property name="sizeGripEnabled"> | ||
| <bool>false</bool> | ||
| </property> | ||
| <layout class="QGridLayout" name="gridLayout"> | ||
| <property name="leftMargin"> | ||
| <number>2</number> | ||
| </property> | ||
| <property name="topMargin"> | ||
| <number>2</number> | ||
| </property> | ||
| <property name="rightMargin"> | ||
| <number>2</number> | ||
| </property> | ||
| <property name="bottomMargin"> | ||
| <number>4</number> | ||
| </property> | ||
| <property name="horizontalSpacing"> | ||
| <number>6</number> | ||
| </property> | ||
| <item row="0" column="0"> | ||
| <widget class="QWebView" name="webView"> | ||
| <property name="url"> | ||
| <url> | ||
| <string>about:blank</string> | ||
| </url> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="1" column="0"> | ||
| <widget class="QDialogButtonBox" name="buttonBox"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Horizontal</enum> | ||
| </property> | ||
| <property name="standardButtons"> | ||
| <set>QDialogButtonBox::Close</set> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </widget> | ||
| <customwidgets> | ||
| <customwidget> | ||
| <class>QWebView</class> | ||
| <extends>QWidget</extends> | ||
| <header>QtWebKit/QWebView</header> | ||
| </customwidget> | ||
| </customwidgets> | ||
| <resources/> | ||
| <connections> | ||
| <connection> | ||
| <sender>buttonBox</sender> | ||
| <signal>rejected()</signal> | ||
| <receiver>Help</receiver> | ||
| <slot>reject()</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>259</x> | ||
| <y>310</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>259</x> | ||
| <y>163</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| </connections> | ||
| </ui> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,267 @@ | ||
| # -*- coding:utf-8 -*- | ||
| """ | ||
| /*************************************************************************** | ||
| Python Conosle for QGIS | ||
| ------------------- | ||
| begin : 2012-09-10 | ||
| copyright : (C) 2012 by Salvatore Larosa | ||
| email : lrssvtml (at) gmail (dot) com | ||
| ***************************************************************************/ | ||
| /*************************************************************************** | ||
| * * | ||
| * 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. * | ||
| * * | ||
| ***************************************************************************/ | ||
| Some portions of code were taken from https://code.google.com/p/pydee/ | ||
| """ | ||
|
|
||
| from PyQt4.QtCore import * | ||
| from PyQt4.QtGui import * | ||
| from PyQt4.Qsci import (QsciScintilla, | ||
| QsciScintillaBase, | ||
| QsciLexerPython) | ||
| import sys | ||
|
|
||
| class writeOut: | ||
| def __init__(self, edit, out=None, style=None): | ||
| """ | ||
| This class allow to write stdout and stderr | ||
| """ | ||
| self.outputArea = edit | ||
| self.out = None | ||
| self.style = style | ||
|
|
||
| def write(self, m): | ||
| if self.style == "traceback": | ||
| self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1) | ||
| self.outputArea.append(m) | ||
| self.outputArea.SendScintilla(QsciScintilla.SCI_SETSTYLING, len(m), 1) | ||
| else: | ||
| self.outputArea.append(m) | ||
| self.move_cursor_to_end() | ||
|
|
||
| if self.out: | ||
| self.out.write(m) | ||
|
|
||
| def move_cursor_to_end(self): | ||
| """Move cursor to end of text""" | ||
| line, index = self.get_end_pos() | ||
| self.outputArea.setCursorPosition(line, index) | ||
| self.outputArea.ensureCursorVisible() | ||
| self.outputArea.ensureLineVisible(line) | ||
|
|
||
| def get_end_pos(self): | ||
| """Return (line, index) position of the last character""" | ||
| line = self.outputArea.lines() - 1 | ||
| return (line, self.outputArea.text(line).length()) | ||
|
|
||
| def flush(self): | ||
| pass | ||
|
|
||
| class EditorOutput(QsciScintilla): | ||
| def __init__(self, parent=None): | ||
| #QsciScintilla.__init__(self, parent) | ||
| super(EditorOutput,self).__init__(parent) | ||
| self.parent = parent | ||
| self.edit = self.parent.edit | ||
|
|
||
| # Enable non-ascii chars for editor | ||
| self.setUtf8(True) | ||
|
|
||
| sys.stdout = writeOut(self, sys.stdout) | ||
| sys.stderr = writeOut(self, sys.stderr, "traceback") | ||
|
|
||
| self.insertInitText() | ||
| self.setLexers() | ||
| self.setReadOnly(True) | ||
|
|
||
| # Set the default font | ||
| font = QFont() | ||
| font.setFamily('Courier') | ||
| font.setFixedPitch(True) | ||
| font.setPointSize(10) | ||
| self.setFont(font) | ||
| self.setMarginsFont(font) | ||
| # Margin 0 is used for line numbers | ||
| #fm = QFontMetrics(font) | ||
| self.setMarginsFont(font) | ||
| self.setMarginWidth(1, "00000") | ||
| self.setMarginLineNumbers(1, True) | ||
| self.setMarginsForegroundColor(QColor("#3E3EE3")) | ||
| self.setMarginsBackgroundColor(QColor("#f9f9f9")) | ||
| self.setCaretLineVisible(True) | ||
| self.setCaretLineBackgroundColor(QColor("#fcf3ed")) | ||
|
|
||
| self.setMinimumHeight(120) | ||
|
|
||
| # Folding | ||
| #self.setFolding(QsciScintilla.BoxedTreeFoldStyle) | ||
| #self.setFoldMarginColors(QColor("#99CC66"),QColor("#333300")) | ||
| #self.setWrapMode(QsciScintilla.WrapCharacter) | ||
|
|
||
| ## Edge Mode | ||
| #self.setEdgeMode(QsciScintilla.EdgeLine) | ||
| #self.setEdgeColumn(80) | ||
| #self.setEdgeColor(QColor("#FF0000")) | ||
|
|
||
| self.setWrapMode(QsciScintilla.WrapCharacter) | ||
| self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0) | ||
|
|
||
| self.runShortcut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self) | ||
| self.runShortcut.activated.connect(self.enteredSelected) | ||
| # Reimplemeted copy action to prevent paste prompt (>>>,...) in command view | ||
| self.copyShortcut = QShortcut(QKeySequence.Copy, self) | ||
| self.copyShortcut.activated.connect(self.copy) | ||
| self.selectAllShortcut = QShortcut(QKeySequence.SelectAll, self) | ||
| self.selectAllShortcut.activated.connect(self.selectAll) | ||
|
|
||
| def insertInitText(self): | ||
| txtInit = QCoreApplication.translate("PythonConsole", | ||
| "## To access Quantum GIS environment from this console\n" | ||
| "## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.\n\n") | ||
| initText = self.setText(txtInit) | ||
|
|
||
| def refreshLexerProperties(self): | ||
| self.setLexers() | ||
|
|
||
| def setLexers(self): | ||
| self.lexer = QsciLexerPython() | ||
|
|
||
| settings = QSettings() | ||
| loadFont = settings.value("pythonConsole/fontfamilytext", "Monospace").toString() | ||
| fontSize = settings.value("pythonConsole/fontsize", 10).toInt()[0] | ||
| font = QFont(loadFont) | ||
| font.setFixedPitch(True) | ||
| font.setPointSize(fontSize) | ||
|
|
||
| self.lexer.setDefaultFont(font) | ||
| self.lexer.setColor(Qt.red, 1) | ||
| self.lexer.setColor(Qt.darkGreen, 5) | ||
| self.lexer.setColor(Qt.darkBlue, 15) | ||
| self.lexer.setFont(font, 1) | ||
| self.lexer.setFont(font, 2) | ||
| self.lexer.setFont(font, 3) | ||
| self.lexer.setFont(font, 4) | ||
|
|
||
| self.setLexer(self.lexer) | ||
|
|
||
| def getTextFromEditor(self): | ||
| text = self.text() | ||
| textList = text.split("\n") | ||
| return textList | ||
|
|
||
| def clearConsole(self): | ||
| #self.SendScintilla(QsciScintilla.SCI_CLEARALL) | ||
| self.setText('') | ||
| self.insertInitText() | ||
| self.edit.setFocus() | ||
|
|
||
| def contextMenuEvent(self, e): | ||
| menu = QMenu(self) | ||
| iconRun = QIcon(":/images/console/iconRunConsole.png") | ||
| iconPastebin = QIcon(":/images/console/iconCodepadConsole.png") | ||
| iconClear = QIcon(":/images/console/iconClearConsole.png") | ||
| iconHideTool = QIcon(":/images/console/iconHideToolConsole.png") | ||
| hideToolBar = menu.addAction(iconHideTool, | ||
| "Hide/Show Toolbar", | ||
| self.hideToolBar) | ||
| menu.addSeparator() | ||
| runAction = menu.addAction(iconRun, | ||
| "Enter Selected", | ||
| self.enteredSelected, | ||
| QKeySequence(Qt.CTRL + Qt.Key_E)) | ||
| clearAction = menu.addAction(iconClear, | ||
| "Clear console", | ||
| self.clearConsole) | ||
| menu.addSeparator() | ||
| copyAction = menu.addAction("Copy", | ||
| self.copy, | ||
| QKeySequence.Copy) | ||
| pastebinAction = menu.addAction(iconPastebin, | ||
| "Share on codepad", | ||
| self.pastebin) | ||
| menu.addSeparator() | ||
| selectAllAction = menu.addAction("Select All", | ||
| self.selectAll, | ||
| QKeySequence.SelectAll) | ||
| runAction.setEnabled(False) | ||
| clearAction.setEnabled(False) | ||
| copyAction.setEnabled(False) | ||
| pastebinAction.setEnabled(False) | ||
| selectAllAction.setEnabled(False) | ||
| if self.hasSelectedText(): | ||
| runAction.setEnabled(True) | ||
| copyAction.setEnabled(True) | ||
| pastebinAction.setEnabled(True) | ||
| if not self.text(3) == '': | ||
| selectAllAction.setEnabled(True) | ||
| clearAction.setEnabled(True) | ||
| action = menu.exec_(self.mapToGlobal(e.pos())) | ||
|
|
||
| def hideToolBar(self): | ||
| tB = self.parent.toolBar | ||
| tB.hide() if tB.isVisible() else tB.show() | ||
| self.edit.setFocus() | ||
|
|
||
| def copy(self): | ||
| """Copy text to clipboard... or keyboard interrupt""" | ||
| if self.hasSelectedText(): | ||
| text = unicode(self.selectedText()) | ||
| text = text.replace('>>> ', '').replace('... ', '').strip() # removing prompts | ||
| QApplication.clipboard().setText(text) | ||
| else: | ||
| self.emit(SIGNAL("keyboard_interrupt()")) | ||
|
|
||
| def enteredSelected(self): | ||
| cmd = self.selectedText() | ||
| self.edit.insertFromDropPaste(cmd) | ||
| self.edit.entered() | ||
|
|
||
| def keyPressEvent(self, e): | ||
| # empty text indicates possible shortcut key sequence so stay in output | ||
| txt = e.text() | ||
| if txt.length() and txt >= " ": | ||
| self.edit.append(txt) | ||
| self.edit.move_cursor_to_end() | ||
| self.edit.setFocus() | ||
| e.ignore() | ||
| else: | ||
| # possible shortcut key sequence, accept it | ||
| e.accept() | ||
|
|
||
| def pastebin(self): | ||
| import urllib2, urllib | ||
| listText = self.selectedText().split('\n') | ||
| getCmd = [] | ||
| for strLine in listText: | ||
| if strLine != "": | ||
| #if s[0:3] in (">>>", "..."): | ||
| # filter for special command (_save,_clear) and comment | ||
| if strLine[4] != "_" and strLine[:2] != "##": | ||
| strLine.replace(">>> ", "").replace("... ", "") | ||
| getCmd.append(unicode(strLine)) | ||
| pasteText= u"\n".join(getCmd) | ||
| url = 'http://codepad.org' | ||
| values = {'lang' : 'Python', | ||
| 'code' : pasteText, | ||
| 'submit':'Submit'} | ||
| try: | ||
| response = urllib2.urlopen(url, urllib.urlencode(values)) | ||
| url = response.read() | ||
| for href in url.split("</a>"): | ||
| if "Link:" in href: | ||
| ind=href.index('Link:') | ||
| found = href[ind+5:] | ||
| for i in found.split('">'): | ||
| if '<a href=' in i: | ||
| link = i.replace('<a href="',"").strip() | ||
| if link: | ||
| QApplication.clipboard().setText(link) | ||
| print "## URL copied to clipboard ##" | ||
| except urllib2.URLError, e: | ||
| print "## Connection error ##" | ||
| print "## " + str(e.args) + " ##" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,272 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <ui version="4.0"> | ||
| <class>SettingsDialog</class> | ||
| <widget class="QDialog" name="SettingsDialog"> | ||
| <property name="windowModality"> | ||
| <enum>Qt::NonModal</enum> | ||
| </property> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>0</x> | ||
| <y>0</y> | ||
| <width>411</width> | ||
| <height>352</height> | ||
| </rect> | ||
| </property> | ||
| <property name="modal"> | ||
| <bool>true</bool> | ||
| </property> | ||
| <layout class="QGridLayout" name="gridLayout_2"> | ||
| <item row="0" column="0"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout"> | ||
| <item> | ||
| <widget class="QLabel" name="label"> | ||
| <property name="text"> | ||
| <string>Font</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QFontComboBox" name="fontComboBox"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> | ||
| <horstretch>0</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="insertPolicy"> | ||
| <enum>QComboBox::NoInsert</enum> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QLabel" name="label_3"> | ||
| <property name="text"> | ||
| <string>Size</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QSpinBox" name="spinBox"> | ||
| <property name="minimumSize"> | ||
| <size> | ||
| <width>51</width> | ||
| <height>26</height> | ||
| </size> | ||
| </property> | ||
| <property name="maximumSize"> | ||
| <size> | ||
| <width>51</width> | ||
| <height>26</height> | ||
| </size> | ||
| </property> | ||
| <property name="minimum"> | ||
| <number>6</number> | ||
| </property> | ||
| <property name="maximum"> | ||
| <number>15</number> | ||
| </property> | ||
| <property name="value"> | ||
| <number>10</number> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| <item row="1" column="0"> | ||
| <spacer name="verticalSpacer_2"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Vertical</enum> | ||
| </property> | ||
| <property name="sizeHint" stdset="0"> | ||
| <size> | ||
| <width>20</width> | ||
| <height>40</height> | ||
| </size> | ||
| </property> | ||
| </spacer> | ||
| </item> | ||
| <item row="3" column="0"> | ||
| <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
| <item> | ||
| <widget class="QLabel" name="label_2"> | ||
| <property name="text"> | ||
| <string>API file</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QLineEdit" name="lineEdit"/> | ||
| </item> | ||
| <item> | ||
| <widget class="QPushButton" name="browseButton"> | ||
| <property name="text"> | ||
| <string>Browse</string> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| <item row="5" column="0"> | ||
| <layout class="QGridLayout" name="gridLayout"> | ||
| <item row="0" column="0"> | ||
| <widget class="QTableWidget" name="tableWidget"> | ||
| <property name="editTriggers"> | ||
| <set>QAbstractItemView::NoEditTriggers</set> | ||
| </property> | ||
| <property name="tabKeyNavigation"> | ||
| <bool>false</bool> | ||
| </property> | ||
| <property name="showDropIndicator" stdset="0"> | ||
| <bool>false</bool> | ||
| </property> | ||
| <property name="dragDropOverwriteMode"> | ||
| <bool>false</bool> | ||
| </property> | ||
| <property name="selectionMode"> | ||
| <enum>QAbstractItemView::ExtendedSelection</enum> | ||
| </property> | ||
| <property name="selectionBehavior"> | ||
| <enum>QAbstractItemView::SelectItems</enum> | ||
| </property> | ||
| <property name="verticalScrollMode"> | ||
| <enum>QAbstractItemView::ScrollPerItem</enum> | ||
| </property> | ||
| <property name="horizontalScrollMode"> | ||
| <enum>QAbstractItemView::ScrollPerPixel</enum> | ||
| </property> | ||
| <property name="rowCount"> | ||
| <number>0</number> | ||
| </property> | ||
| <attribute name="horizontalHeaderVisible"> | ||
| <bool>true</bool> | ||
| </attribute> | ||
| <attribute name="verticalHeaderVisible"> | ||
| <bool>false</bool> | ||
| </attribute> | ||
| </widget> | ||
| </item> | ||
| <item row="0" column="1"> | ||
| <layout class="QVBoxLayout" name="verticalLayout"> | ||
| <item> | ||
| <widget class="QPushButton" name="addAPIpath"> | ||
| <property name="sizePolicy"> | ||
| <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> | ||
| <horstretch>0</horstretch> | ||
| <verstretch>0</verstretch> | ||
| </sizepolicy> | ||
| </property> | ||
| <property name="minimumSize"> | ||
| <size> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| </size> | ||
| </property> | ||
| <property name="maximumSize"> | ||
| <size> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| </size> | ||
| </property> | ||
| <property name="text"> | ||
| <string/> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <widget class="QPushButton" name="removeAPIpath"> | ||
| <property name="minimumSize"> | ||
| <size> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| </size> | ||
| </property> | ||
| <property name="maximumSize"> | ||
| <size> | ||
| <width>32</width> | ||
| <height>32</height> | ||
| </size> | ||
| </property> | ||
| <property name="text"> | ||
| <string/> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item> | ||
| <spacer name="verticalSpacer"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Vertical</enum> | ||
| </property> | ||
| <property name="sizeHint" stdset="0"> | ||
| <size> | ||
| <width>20</width> | ||
| <height>40</height> | ||
| </size> | ||
| </property> | ||
| </spacer> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| </layout> | ||
| </item> | ||
| <item row="6" column="0"> | ||
| <widget class="QDialogButtonBox" name="buttonBox"> | ||
| <property name="orientation"> | ||
| <enum>Qt::Horizontal</enum> | ||
| </property> | ||
| <property name="standardButtons"> | ||
| <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| <item row="2" column="0"> | ||
| <widget class="QCheckBox" name="preloadAPI"> | ||
| <property name="text"> | ||
| <string>Use preloaded API file</string> | ||
| </property> | ||
| <property name="checked"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| </item> | ||
| </layout> | ||
| <zorder>buttonBox</zorder> | ||
| <zorder>verticalSpacer_2</zorder> | ||
| <zorder>preloadAPI</zorder> | ||
| </widget> | ||
| <resources/> | ||
| <connections> | ||
| <connection> | ||
| <sender>buttonBox</sender> | ||
| <signal>accepted()</signal> | ||
| <receiver>SettingsDialog</receiver> | ||
| <slot>accept()</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>248</x> | ||
| <y>254</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>157</x> | ||
| <y>274</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| <connection> | ||
| <sender>buttonBox</sender> | ||
| <signal>rejected()</signal> | ||
| <receiver>SettingsDialog</receiver> | ||
| <slot>reject()</slot> | ||
| <hints> | ||
| <hint type="sourcelabel"> | ||
| <x>316</x> | ||
| <y>260</y> | ||
| </hint> | ||
| <hint type="destinationlabel"> | ||
| <x>286</x> | ||
| <y>274</y> | ||
| </hint> | ||
| </hints> | ||
| </connection> | ||
| </connections> | ||
| </ui> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
|
|
||
| /** LineEdit with builtin clear button | ||
| */ | ||
| class QgsFilterLineEdit : QLineEdit | ||
| { | ||
| %TypeHeaderCode | ||
| #include <qgsfilterlineedit.h> | ||
| %End | ||
|
|
||
| public: | ||
| QgsFilterLineEdit( QWidget* parent = 0 ); | ||
|
|
||
| protected: | ||
| void resizeEvent( QResizeEvent * ); | ||
| }; |